aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/chipsets/ata-promise.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/chipsets/ata-promise.c')
-rw-r--r--sys/dev/ata/chipsets/ata-promise.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ata/chipsets/ata-promise.c b/sys/dev/ata/chipsets/ata-promise.c
index 6b34596fa01d..f0632071b2c1 100644
--- a/sys/dev/ata/chipsets/ata-promise.c
+++ b/sys/dev/ata/chipsets/ata-promise.c
@@ -283,7 +283,7 @@ ata_promise_chipinit(device_t dev)
mtx_init(&hpkt->mtx, "ATA promise HPKT lock", NULL, MTX_DEF);
TAILQ_INIT(&hpkt->queue);
hpkt->busy = 0;
- device_set_ivars(dev, hpkt);
+ ctlr->chipset_data = hpkt;
ctlr->ch_attach = ata_promise_mio_ch_attach;
ctlr->ch_detach = ata_promise_mio_ch_detach;
ctlr->reset = ata_promise_mio_reset;
@@ -730,7 +730,7 @@ ata_promise_mio_reset(device_t dev)
case PR_SX4X:
/* softreset channel ATA module */
- hpktp = device_get_ivars(ctlr->dev);
+ hpktp = ctlr->chipset_data;
ATA_OUTL(ctlr->r_res2, 0xc0260 + (ch->unit << 7), ch->unit + 1);
ata_udelay(1000);
ATA_OUTL(ctlr->r_res2, 0xc0260 + (ch->unit << 7),
@@ -1054,7 +1054,7 @@ ata_promise_sx4_command(struct ata_request *request)
device_t gparent = GRANDPARENT(request->dev);
struct ata_pci_controller *ctlr = device_get_softc(gparent);
struct ata_channel *ch = device_get_softc(request->parent);
- struct ata_dma_prdentry *prd = request->dma->sg;
+ struct ata_dma_prdentry *prd;
caddr_t window = rman_get_virtual(ctlr->r_res1);
u_int32_t *wordp;
int i, idx, length = 0;
@@ -1098,6 +1098,7 @@ ata_promise_sx4_command(struct ata_request *request)
case ATA_READ_DMA48:
case ATA_WRITE_DMA:
case ATA_WRITE_DMA48:
+ prd = request->dma->sg;
wordp = (u_int32_t *)
(window + (ch->unit * ATA_PDC_CHN_OFFSET) + ATA_PDC_HSG_OFFSET);
i = idx = 0;
@@ -1208,7 +1209,7 @@ ata_promise_apkt(u_int8_t *bytep, struct ata_request *request)
static void
ata_promise_queue_hpkt(struct ata_pci_controller *ctlr, u_int32_t hpkt)
{
- struct ata_promise_sx4 *hpktp = device_get_ivars(ctlr->dev);
+ struct ata_promise_sx4 *hpktp = ctlr->chipset_data;
mtx_lock(&hpktp->mtx);
if (hpktp->busy) {
@@ -1227,7 +1228,7 @@ ata_promise_queue_hpkt(struct ata_pci_controller *ctlr, u_int32_t hpkt)
static void
ata_promise_next_hpkt(struct ata_pci_controller *ctlr)
{
- struct ata_promise_sx4 *hpktp = device_get_ivars(ctlr->dev);
+ struct ata_promise_sx4 *hpktp = ctlr->chipset_data;
struct host_packet *hp;
mtx_lock(&hpktp->mtx);