Lines Matching defs:adev
118 * @adev: Device to program
126 static void it821x_program(struct ata_port *ap, struct ata_device *adev, u16 timing)
145 * @adev: ATA device to update
154 static void it821x_program_udma(struct ata_port *ap, struct ata_device *adev, u16 timing)
159 int unit = adev->devno;
179 * @adev: ATA device being updated
185 static void it821x_clock_strategy(struct ata_port *ap, struct ata_device *adev)
189 u8 unit = adev->devno;
190 struct ata_device *pair = ata_dev_pair(adev);
241 it821x_program_udma(ap, adev, itdev->udma[unit]);
242 it821x_program(ap, adev, itdev->pio[unit]);
249 * @adev: ATA device
255 static void it821x_passthru_set_piomode(struct ata_port *ap, struct ata_device *adev)
262 int unit = adev->devno;
263 int mode_wanted = adev->pio_mode - XFER_PIO_0;
269 it821x_clock_strategy(ap, adev);
270 it821x_program(ap, adev, itdev->pio[unit]);
276 * @adev: ATA device
285 static void it821x_passthru_set_dmamode(struct ata_port *ap, struct ata_device *adev)
295 int unit = adev->devno;
298 if (adev->dma_mode >= XFER_UDMA_0) {
299 int mode_wanted = adev->dma_mode - XFER_UDMA_0;
315 it821x_clock_strategy(ap, adev);
316 it821x_program_udma(ap, adev, itdev->udma[unit]);
318 int mode_wanted = adev->dma_mode - XFER_MW_DMA_0;
332 it821x_clock_strategy(ap, adev);
348 struct ata_device *adev = qc->dev;
350 int unit = adev->devno;
353 it821x_program(ap, adev, itdev->mwdma[unit]);
355 it821x_program_udma(ap, adev, itdev->udma[unit]);
371 struct ata_device *adev = qc->dev;
373 int unit = adev->devno;
377 it821x_program(ap, adev, itdev->pio[unit]);
394 struct ata_device *adev = &ap->link.device[device];
395 it821x_program(ap, adev, itdev->pio[adev->devno]);
491 * @adev: Device that has just been identified
499 static void it821x_dev_config(struct ata_device *adev)
503 ata_id_c_string(adev->id, model_num, ATA_ID_PROD, sizeof(model_num));
505 if (adev->max_sectors > 255)
506 adev->max_sectors = 255;
510 ata_dev_info(adev, "%sRAID%d volume",
511 adev->id[147] ? "Bootable " : "",
512 adev->id[129]);
513 if (adev->id[129] != 1)
514 pr_cont("(%dK stripe)", adev->id[146]);
519 adev->horkage &= ~ATA_HORKAGE_DIAGNOSTIC;
521 adev->horkage |= ATA_HORKAGE_BROKEN_HPA;
526 * @adev: device to read
536 static unsigned int it821x_read_id(struct ata_device *adev,
542 err_mask = ata_do_dev_read_id(adev, tf, id);