aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c61
1 files changed, 32 insertions, 29 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 10f15ab95fab..47fff7bbf348 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -781,11 +781,9 @@ void ata_std_dev_select (struct ata_port *ap, unsigned int device)
781void ata_dev_select(struct ata_port *ap, unsigned int device, 781void ata_dev_select(struct ata_port *ap, unsigned int device,
782 unsigned int wait, unsigned int can_sleep) 782 unsigned int wait, unsigned int can_sleep)
783{ 783{
784 if (ata_msg_probe(ap)) { 784 if (ata_msg_probe(ap))
785 ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, ata%u: " 785 ata_port_printk(ap, KERN_INFO, "ata_dev_select: ENTER, ata%u: "
786 "device %u, wait %u\n", 786 "device %u, wait %u\n", ap->id, device, wait);
787 ap->id, device, wait);
788 }
789 787
790 if (wait) 788 if (wait)
791 ata_wait_idle(ap); 789 ata_wait_idle(ap);
@@ -954,7 +952,8 @@ void ata_port_flush_task(struct ata_port *ap)
954 */ 952 */
955 if (!cancel_delayed_work(&ap->port_task)) { 953 if (!cancel_delayed_work(&ap->port_task)) {
956 if (ata_msg_ctl(ap)) 954 if (ata_msg_ctl(ap))
957 ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n", __FUNCTION__); 955 ata_port_printk(ap, KERN_DEBUG, "%s: flush #2\n",
956 __FUNCTION__);
958 flush_workqueue(ata_wq); 957 flush_workqueue(ata_wq);
959 } 958 }
960 959
@@ -1085,7 +1084,7 @@ unsigned ata_exec_internal(struct ata_device *dev,
1085 1084
1086 if (ata_msg_warn(ap)) 1085 if (ata_msg_warn(ap))
1087 ata_dev_printk(dev, KERN_WARNING, 1086 ata_dev_printk(dev, KERN_WARNING,
1088 "qc timeout (cmd 0x%x)\n", command); 1087 "qc timeout (cmd 0x%x)\n", command);
1089 } 1088 }
1090 1089
1091 spin_unlock_irqrestore(ap->lock, flags); 1090 spin_unlock_irqrestore(ap->lock, flags);
@@ -1097,9 +1096,9 @@ unsigned ata_exec_internal(struct ata_device *dev,
1097 1096
1098 if (qc->flags & ATA_QCFLAG_FAILED && !qc->err_mask) { 1097 if (qc->flags & ATA_QCFLAG_FAILED && !qc->err_mask) {
1099 if (ata_msg_warn(ap)) 1098 if (ata_msg_warn(ap))
1100 ata_dev_printk(dev, KERN_WARNING, 1099 ata_dev_printk(dev, KERN_WARNING,
1101 "zero err_mask for failed " 1100 "zero err_mask for failed "
1102 "internal command, assuming AC_ERR_OTHER\n"); 1101 "internal command, assuming AC_ERR_OTHER\n");
1103 qc->err_mask |= AC_ERR_OTHER; 1102 qc->err_mask |= AC_ERR_OTHER;
1104 } 1103 }
1105 1104
@@ -1224,8 +1223,8 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
1224 int rc; 1223 int rc;
1225 1224
1226 if (ata_msg_ctl(ap)) 1225 if (ata_msg_ctl(ap))
1227 ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", 1226 ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n",
1228 __FUNCTION__, ap->id, dev->devno); 1227 __FUNCTION__, ap->id, dev->devno);
1229 1228
1230 ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ 1229 ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */
1231 1230
@@ -1294,9 +1293,9 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
1294 return 0; 1293 return 0;
1295 1294
1296 err_out: 1295 err_out:
1297 if (ata_msg_warn(ap)) 1296 if (ata_msg_warn(ap))
1298 ata_dev_printk(dev, KERN_WARNING, "failed to IDENTIFY " 1297 ata_dev_printk(dev, KERN_WARNING, "failed to IDENTIFY "
1299 "(%s, err_mask=0x%x)\n", reason, err_mask); 1298 "(%s, err_mask=0x%x)\n", reason, err_mask);
1300 return rc; 1299 return rc;
1301} 1300}
1302 1301
@@ -1349,19 +1348,21 @@ int ata_dev_configure(struct ata_device *dev, int print_info)
1349 int i, rc; 1348 int i, rc;
1350 1349
1351 if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { 1350 if (!ata_dev_enabled(dev) && ata_msg_info(ap)) {
1352 ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n", 1351 ata_dev_printk(dev, KERN_INFO,
1353 __FUNCTION__, ap->id, dev->devno); 1352 "%s: ENTER/EXIT (host %u, dev %u) -- nodev\n",
1353 __FUNCTION__, ap->id, dev->devno);
1354 return 0; 1354 return 0;
1355 } 1355 }
1356 1356
1357 if (ata_msg_probe(ap)) 1357 if (ata_msg_probe(ap))
1358 ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n", 1358 ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER, host %u, dev %u\n",
1359 __FUNCTION__, ap->id, dev->devno); 1359 __FUNCTION__, ap->id, dev->devno);
1360 1360
1361 /* print device capabilities */ 1361 /* print device capabilities */
1362 if (ata_msg_probe(ap)) 1362 if (ata_msg_probe(ap))
1363 ata_dev_printk(dev, KERN_DEBUG, "%s: cfg 49:%04x 82:%04x 83:%04x " 1363 ata_dev_printk(dev, KERN_DEBUG,
1364 "84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n", 1364 "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x "
1365 "85:%04x 86:%04x 87:%04x 88:%04x\n",
1365 __FUNCTION__, 1366 __FUNCTION__,
1366 id[49], id[82], id[83], id[84], 1367 id[49], id[82], id[83], id[84],
1367 id[85], id[86], id[87], id[88]); 1368 id[85], id[86], id[87], id[88]);
@@ -1433,14 +1434,16 @@ int ata_dev_configure(struct ata_device *dev, int print_info)
1433 ata_id_major_version(id), 1434 ata_id_major_version(id),
1434 ata_mode_string(xfer_mask), 1435 ata_mode_string(xfer_mask),
1435 (unsigned long long)dev->n_sectors, 1436 (unsigned long long)dev->n_sectors,
1436 dev->cylinders, dev->heads, dev->sectors); 1437 dev->cylinders, dev->heads,
1438 dev->sectors);
1437 } 1439 }
1438 1440
1439 if (dev->id[59] & 0x100) { 1441 if (dev->id[59] & 0x100) {
1440 dev->multi_count = dev->id[59] & 0xff; 1442 dev->multi_count = dev->id[59] & 0xff;
1441 if (ata_msg_info(ap)) 1443 if (ata_msg_info(ap))
1442 ata_dev_printk(dev, KERN_INFO, "ata%u: dev %u multi count %u\n", 1444 ata_dev_printk(dev, KERN_INFO,
1443 ap->id, dev->devno, dev->multi_count); 1445 "ata%u: dev %u multi count %u\n",
1446 ap->id, dev->devno, dev->multi_count);
1444 } 1447 }
1445 1448
1446 dev->cdb_len = 16; 1449 dev->cdb_len = 16;
@@ -1453,8 +1456,8 @@ int ata_dev_configure(struct ata_device *dev, int print_info)
1453 rc = atapi_cdb_len(id); 1456 rc = atapi_cdb_len(id);
1454 if ((rc < 12) || (rc > ATAPI_CDB_LEN)) { 1457 if ((rc < 12) || (rc > ATAPI_CDB_LEN)) {
1455 if (ata_msg_warn(ap)) 1458 if (ata_msg_warn(ap))
1456 ata_dev_printk(dev, KERN_WARNING, 1459 ata_dev_printk(dev, KERN_WARNING,
1457 "unsupported CDB len\n"); 1460 "unsupported CDB len\n");
1458 rc = -EINVAL; 1461 rc = -EINVAL;
1459 goto err_out_nosup; 1462 goto err_out_nosup;
1460 } 1463 }
@@ -1497,8 +1500,8 @@ int ata_dev_configure(struct ata_device *dev, int print_info)
1497 1500
1498err_out_nosup: 1501err_out_nosup:
1499 if (ata_msg_probe(ap)) 1502 if (ata_msg_probe(ap))
1500 ata_dev_printk(dev, KERN_DEBUG, 1503 ata_dev_printk(dev, KERN_DEBUG,
1501 "%s: EXIT, err\n", __FUNCTION__); 1504 "%s: EXIT, err\n", __FUNCTION__);
1502 return rc; 1505 return rc;
1503} 1506}
1504 1507
@@ -3558,7 +3561,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words)
3558 * Inherited from caller. 3561 * Inherited from caller.
3559 */ 3562 */
3560 3563
3561void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, 3564void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf,
3562 unsigned int buflen, int write_data) 3565 unsigned int buflen, int write_data)
3563{ 3566{
3564 struct ata_port *ap = adev->ap; 3567 struct ata_port *ap = adev->ap;
@@ -3604,7 +3607,7 @@ void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf,
3604 * Inherited from caller. 3607 * Inherited from caller.
3605 */ 3608 */
3606 3609
3607void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, 3610void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf,
3608 unsigned int buflen, int write_data) 3611 unsigned int buflen, int write_data)
3609{ 3612{
3610 struct ata_port *ap = adev->ap; 3613 struct ata_port *ap = adev->ap;
@@ -3638,7 +3641,7 @@ void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf,
3638 * @buflen: buffer length 3641 * @buflen: buffer length
3639 * @write_data: read/write 3642 * @write_data: read/write
3640 * 3643 *
3641 * Transfer data from/to the device data register by PIO. Do the 3644 * Transfer data from/to the device data register by PIO. Do the
3642 * transfer with interrupts disabled. 3645 * transfer with interrupts disabled.
3643 * 3646 *
3644 * LOCKING: 3647 * LOCKING:
@@ -5245,7 +5248,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
5245 ap->msg_enable = 0x00FF; 5248 ap->msg_enable = 0x00FF;
5246#elif defined(ATA_DEBUG) 5249#elif defined(ATA_DEBUG)
5247 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO | ATA_MSG_CTL | ATA_MSG_WARN | ATA_MSG_ERR; 5250 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_INFO | ATA_MSG_CTL | ATA_MSG_WARN | ATA_MSG_ERR;
5248#else 5251#else
5249 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; 5252 ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN;
5250#endif 5253#endif
5251 5254