aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/ata_piix.c1
-rw-r--r--drivers/scsi/libata-core.c60
-rw-r--r--drivers/scsi/libata-scsi.c9
3 files changed, 36 insertions, 34 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c
index 2d984b090b23..49cc4209fe16 100644
--- a/drivers/scsi/ata_piix.c
+++ b/drivers/scsi/ata_piix.c
@@ -630,6 +630,7 @@ static int piix_disable_ahci(struct pci_dev *pdev)
630 630
631/** 631/**
632 * piix_check_450nx_errata - Check for problem 450NX setup 632 * piix_check_450nx_errata - Check for problem 450NX setup
633 * @ata_dev: the PCI device to check
633 * 634 *
634 * Check for the present of 450NX errata #19 and errata #25. If 635 * Check for the present of 450NX errata #19 and errata #25. If
635 * they are found return an error code so we can turn off DMA 636 * they are found return an error code so we can turn off DMA
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index b369dbd7cb23..249e67fab81f 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1442,12 +1442,11 @@ static inline u8 ata_dev_knobble(const struct ata_port *ap)
1442} 1442}
1443 1443
1444/** 1444/**
1445 * ata_dev_config - Run device specific handlers and check for 1445 * ata_dev_config - Run device specific handlers & check for SATA->PATA bridges
1446 * SATA->PATA bridges 1446 * @ap: Bus
1447 * @ap: Bus 1447 * @i: Device
1448 * @i: Device
1449 * 1448 *
1450 * LOCKING: 1449 * LOCKING:
1451 */ 1450 */
1452 1451
1453void ata_dev_config(struct ata_port *ap, unsigned int i) 1452void ata_dev_config(struct ata_port *ap, unsigned int i)
@@ -1794,9 +1793,9 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1794 ata_timing_quantize(t, t, T, UT); 1793 ata_timing_quantize(t, t, T, UT);
1795 1794
1796 /* 1795 /*
1797 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY, S.M.A.R.T 1796 * Even in DMA/UDMA modes we still use PIO access for IDENTIFY,
1798 * and some other commands. We have to ensure that the DMA cycle timing is 1797 * S.M.A.R.T * and some other commands. We have to ensure that the
1799 * slower/equal than the fastest PIO timing. 1798 * DMA cycle timing is slower/equal than the fastest PIO timing.
1800 */ 1799 */
1801 1800
1802 if (speed > XFER_PIO_4) { 1801 if (speed > XFER_PIO_4) {
@@ -1805,7 +1804,7 @@ int ata_timing_compute(struct ata_device *adev, unsigned short speed,
1805 } 1804 }
1806 1805
1807 /* 1806 /*
1808 * Lenghten active & recovery time so that cycle time is correct. 1807 * Lengthen active & recovery time so that cycle time is correct.
1809 */ 1808 */
1810 1809
1811 if (t->act8b + t->rec8b < t->cyc8b) { 1810 if (t->act8b + t->rec8b < t->cyc8b) {
@@ -1924,7 +1923,6 @@ static void ata_host_set_dma(struct ata_port *ap, u8 xfer_mode,
1924 * 1923 *
1925 * LOCKING: 1924 * LOCKING:
1926 * PCI/etc. bus probe sem. 1925 * PCI/etc. bus probe sem.
1927 *
1928 */ 1926 */
1929static void ata_set_mode(struct ata_port *ap) 1927static void ata_set_mode(struct ata_port *ap)
1930{ 1928{
@@ -1973,7 +1971,6 @@ err_out:
1973 * or a timeout occurs. 1971 * or a timeout occurs.
1974 * 1972 *
1975 * LOCKING: None. 1973 * LOCKING: None.
1976 *
1977 */ 1974 */
1978 1975
1979unsigned int ata_busy_sleep (struct ata_port *ap, 1976unsigned int ata_busy_sleep (struct ata_port *ap,
@@ -3200,7 +3197,7 @@ void ata_poll_qc_complete(struct ata_queued_cmd *qc)
3200} 3197}
3201 3198
3202/** 3199/**
3203 * ata_pio_poll - 3200 * ata_pio_poll - poll using PIO, depending on current state
3204 * @ap: the target ata_port 3201 * @ap: the target ata_port
3205 * 3202 *
3206 * LOCKING: 3203 * LOCKING:
@@ -3307,7 +3304,7 @@ static int ata_pio_complete (struct ata_port *ap)
3307 3304
3308 3305
3309/** 3306/**
3310 * swap_buf_le16 - swap halves of 16-words in place 3307 * swap_buf_le16 - swap halves of 16-bit words in place
3311 * @buf: Buffer to swap 3308 * @buf: Buffer to swap
3312 * @buf_words: Number of 16-bit words in buffer. 3309 * @buf_words: Number of 16-bit words in buffer.
3313 * 3310 *
@@ -4520,19 +4517,6 @@ err_out:
4520} 4517}
4521 4518
4522 4519
4523/**
4524 * ata_port_start - Set port up for dma.
4525 * @ap: Port to initialize
4526 *
4527 * Called just after data structures for each port are
4528 * initialized. Allocates space for PRD table.
4529 *
4530 * May be used as the port_start() entry in ata_port_operations.
4531 *
4532 * LOCKING:
4533 * Inherited from caller.
4534 */
4535
4536/* 4520/*
4537 * Execute a 'simple' command, that only consists of the opcode 'cmd' itself, 4521 * Execute a 'simple' command, that only consists of the opcode 'cmd' itself,
4538 * without filling any other registers 4522 * without filling any other registers
@@ -4584,6 +4568,8 @@ static int ata_start_drive(struct ata_port *ap, struct ata_device *dev)
4584 4568
4585/** 4569/**
4586 * ata_device_resume - wakeup a previously suspended devices 4570 * ata_device_resume - wakeup a previously suspended devices
4571 * @ap: port the device is connected to
4572 * @dev: the device to resume
4587 * 4573 *
4588 * Kick the drive back into action, by sending it an idle immediate 4574 * Kick the drive back into action, by sending it an idle immediate
4589 * command and making sure its transfer mode matches between drive 4575 * command and making sure its transfer mode matches between drive
@@ -4606,10 +4592,11 @@ int ata_device_resume(struct ata_port *ap, struct ata_device *dev)
4606 4592
4607/** 4593/**
4608 * ata_device_suspend - prepare a device for suspend 4594 * ata_device_suspend - prepare a device for suspend
4595 * @ap: port the device is connected to
4596 * @dev: the device to suspend
4609 * 4597 *
4610 * Flush the cache on the drive, if appropriate, then issue a 4598 * Flush the cache on the drive, if appropriate, then issue a
4611 * standbynow command. 4599 * standbynow command.
4612 *
4613 */ 4600 */
4614int ata_device_suspend(struct ata_port *ap, struct ata_device *dev) 4601int ata_device_suspend(struct ata_port *ap, struct ata_device *dev)
4615{ 4602{
@@ -4623,6 +4610,19 @@ int ata_device_suspend(struct ata_port *ap, struct ata_device *dev)
4623 return 0; 4610 return 0;
4624} 4611}
4625 4612
4613/**
4614 * ata_port_start - Set port up for dma.
4615 * @ap: Port to initialize
4616 *
4617 * Called just after data structures for each port are
4618 * initialized. Allocates space for PRD table.
4619 *
4620 * May be used as the port_start() entry in ata_port_operations.
4621 *
4622 * LOCKING:
4623 * Inherited from caller.
4624 */
4625
4626int ata_port_start (struct ata_port *ap) 4626int ata_port_start (struct ata_port *ap)
4627{ 4627{
4628 struct device *dev = ap->host_set->dev; 4628 struct device *dev = ap->host_set->dev;
@@ -4880,9 +4880,9 @@ int ata_device_add(const struct ata_probe_ent *ent)
4880 4880
4881 ap = host_set->ports[i]; 4881 ap = host_set->ports[i];
4882 4882
4883 DPRINTK("ata%u: probe begin\n", ap->id); 4883 DPRINTK("ata%u: bus probe begin\n", ap->id);
4884 rc = ata_bus_probe(ap); 4884 rc = ata_bus_probe(ap);
4885 DPRINTK("ata%u: probe end\n", ap->id); 4885 DPRINTK("ata%u: bus probe end\n", ap->id);
4886 4886
4887 if (rc) { 4887 if (rc) {
4888 /* FIXME: do something useful here? 4888 /* FIXME: do something useful here?
@@ -4906,7 +4906,7 @@ int ata_device_add(const struct ata_probe_ent *ent)
4906 } 4906 }
4907 4907
4908 /* probes are done, now scan each port's disk(s) */ 4908 /* probes are done, now scan each port's disk(s) */
4909 DPRINTK("probe begin\n"); 4909 DPRINTK("host probe begin\n");
4910 for (i = 0; i < count; i++) { 4910 for (i = 0; i < count; i++) {
4911 struct ata_port *ap = host_set->ports[i]; 4911 struct ata_port *ap = host_set->ports[i];
4912 4912
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index ab6b53349d6f..6df82934d2d6 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -151,7 +151,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
151 struct scsi_sense_hdr sshdr; 151 struct scsi_sense_hdr sshdr;
152 enum dma_data_direction data_dir; 152 enum dma_data_direction data_dir;
153 153
154 if (NULL == (void *)arg) 154 if (arg == NULL)
155 return -EINVAL; 155 return -EINVAL;
156 156
157 if (copy_from_user(args, arg, sizeof(args))) 157 if (copy_from_user(args, arg, sizeof(args)))
@@ -201,7 +201,7 @@ int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
201 /* Need code to retrieve data from check condition? */ 201 /* Need code to retrieve data from check condition? */
202 202
203 if ((argbuf) 203 if ((argbuf)
204 && copy_to_user((void *)(arg + sizeof(args)), argbuf, argsize)) 204 && copy_to_user(arg + sizeof(args), argbuf, argsize))
205 rc = -EFAULT; 205 rc = -EFAULT;
206error: 206error:
207 if (argbuf) 207 if (argbuf)
@@ -228,7 +228,7 @@ int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)
228 u8 args[7]; 228 u8 args[7];
229 struct scsi_sense_hdr sshdr; 229 struct scsi_sense_hdr sshdr;
230 230
231 if (NULL == (void *)arg) 231 if (arg == NULL)
232 return -EINVAL; 232 return -EINVAL;
233 233
234 if (copy_from_user(args, arg, sizeof(args))) 234 if (copy_from_user(args, arg, sizeof(args)))
@@ -2533,7 +2533,8 @@ out_unlock:
2533 2533
2534/** 2534/**
2535 * ata_scsi_simulate - simulate SCSI command on ATA device 2535 * ata_scsi_simulate - simulate SCSI command on ATA device
2536 * @id: current IDENTIFY data for target device. 2536 * @ap: port the device is connected to
2537 * @dev: the target device
2537 * @cmd: SCSI command being sent to device. 2538 * @cmd: SCSI command being sent to device.
2538 * @done: SCSI command completion function. 2539 * @done: SCSI command completion function.
2539 * 2540 *