diff options
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 1610f0670c78..3d21d7dd2e5f 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -375,7 +375,7 @@ static void get_container_name_callback(void *context, struct fib * fibptr) | |||
375 | /** | 375 | /** |
376 | * aac_get_container_name - get container name, none blocking. | 376 | * aac_get_container_name - get container name, none blocking. |
377 | */ | 377 | */ |
378 | static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) | 378 | static int aac_get_container_name(struct scsi_cmnd * scsicmd) |
379 | { | 379 | { |
380 | int status; | 380 | int status; |
381 | struct aac_get_name *dinfo; | 381 | struct aac_get_name *dinfo; |
@@ -392,7 +392,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd, int cid) | |||
392 | 392 | ||
393 | dinfo->command = cpu_to_le32(VM_ContainerConfig); | 393 | dinfo->command = cpu_to_le32(VM_ContainerConfig); |
394 | dinfo->type = cpu_to_le32(CT_READ_NAME); | 394 | dinfo->type = cpu_to_le32(CT_READ_NAME); |
395 | dinfo->cid = cpu_to_le32(cid); | 395 | dinfo->cid = cpu_to_le32(scmd_id(scsicmd)); |
396 | dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data)); | 396 | dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data)); |
397 | 397 | ||
398 | status = aac_fib_send(ContainerCommand, | 398 | status = aac_fib_send(ContainerCommand, |
@@ -1361,7 +1361,7 @@ static void io_callback(void *context, struct fib * fibptr) | |||
1361 | scsicmd->scsi_done(scsicmd); | 1361 | scsicmd->scsi_done(scsicmd); |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | static int aac_read(struct scsi_cmnd * scsicmd, int cid) | 1364 | static int aac_read(struct scsi_cmnd * scsicmd) |
1365 | { | 1365 | { |
1366 | u64 lba; | 1366 | u64 lba; |
1367 | u32 count; | 1367 | u32 count; |
@@ -1375,7 +1375,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1375 | */ | 1375 | */ |
1376 | switch (scsicmd->cmnd[0]) { | 1376 | switch (scsicmd->cmnd[0]) { |
1377 | case READ_6: | 1377 | case READ_6: |
1378 | dprintk((KERN_DEBUG "aachba: received a read(6) command on id %d.\n", cid)); | 1378 | dprintk((KERN_DEBUG "aachba: received a read(6) command on id %d.\n", scmd_id(scsicmd))); |
1379 | 1379 | ||
1380 | lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | | 1380 | lba = ((scsicmd->cmnd[1] & 0x1F) << 16) | |
1381 | (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3]; | 1381 | (scsicmd->cmnd[2] << 8) | scsicmd->cmnd[3]; |
@@ -1385,7 +1385,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1385 | count = 256; | 1385 | count = 256; |
1386 | break; | 1386 | break; |
1387 | case READ_16: | 1387 | case READ_16: |
1388 | dprintk((KERN_DEBUG "aachba: received a read(16) command on id %d.\n", cid)); | 1388 | dprintk((KERN_DEBUG "aachba: received a read(16) command on id %d.\n", scmd_id(scsicmd))); |
1389 | 1389 | ||
1390 | lba = ((u64)scsicmd->cmnd[2] << 56) | | 1390 | lba = ((u64)scsicmd->cmnd[2] << 56) | |
1391 | ((u64)scsicmd->cmnd[3] << 48) | | 1391 | ((u64)scsicmd->cmnd[3] << 48) | |
@@ -1399,7 +1399,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1399 | (scsicmd->cmnd[12] << 8) | scsicmd->cmnd[13]; | 1399 | (scsicmd->cmnd[12] << 8) | scsicmd->cmnd[13]; |
1400 | break; | 1400 | break; |
1401 | case READ_12: | 1401 | case READ_12: |
1402 | dprintk((KERN_DEBUG "aachba: received a read(12) command on id %d.\n", cid)); | 1402 | dprintk((KERN_DEBUG "aachba: received a read(12) command on id %d.\n", scmd_id(scsicmd))); |
1403 | 1403 | ||
1404 | lba = ((u64)scsicmd->cmnd[2] << 24) | | 1404 | lba = ((u64)scsicmd->cmnd[2] << 24) | |
1405 | (scsicmd->cmnd[3] << 16) | | 1405 | (scsicmd->cmnd[3] << 16) | |
@@ -1409,7 +1409,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1409 | (scsicmd->cmnd[8] << 8) | scsicmd->cmnd[9]; | 1409 | (scsicmd->cmnd[8] << 8) | scsicmd->cmnd[9]; |
1410 | break; | 1410 | break; |
1411 | default: | 1411 | default: |
1412 | dprintk((KERN_DEBUG "aachba: received a read(10) command on id %d.\n", cid)); | 1412 | dprintk((KERN_DEBUG "aachba: received a read(10) command on id %d.\n", scmd_id(scsicmd))); |
1413 | 1413 | ||
1414 | lba = ((u64)scsicmd->cmnd[2] << 24) | | 1414 | lba = ((u64)scsicmd->cmnd[2] << 24) | |
1415 | (scsicmd->cmnd[3] << 16) | | 1415 | (scsicmd->cmnd[3] << 16) | |
@@ -1449,7 +1449,7 @@ static int aac_read(struct scsi_cmnd * scsicmd, int cid) | |||
1449 | return 0; | 1449 | return 0; |
1450 | } | 1450 | } |
1451 | 1451 | ||
1452 | static int aac_write(struct scsi_cmnd * scsicmd, int cid) | 1452 | static int aac_write(struct scsi_cmnd * scsicmd) |
1453 | { | 1453 | { |
1454 | u64 lba; | 1454 | u64 lba; |
1455 | u32 count; | 1455 | u32 count; |
@@ -1468,7 +1468,7 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1468 | if (count == 0) | 1468 | if (count == 0) |
1469 | count = 256; | 1469 | count = 256; |
1470 | } else if (scsicmd->cmnd[0] == WRITE_16) { /* 16 byte command */ | 1470 | } else if (scsicmd->cmnd[0] == WRITE_16) { /* 16 byte command */ |
1471 | dprintk((KERN_DEBUG "aachba: received a write(16) command on id %d.\n", cid)); | 1471 | dprintk((KERN_DEBUG "aachba: received a write(16) command on id %d.\n", scmd_id(scsicmd))); |
1472 | 1472 | ||
1473 | lba = ((u64)scsicmd->cmnd[2] << 56) | | 1473 | lba = ((u64)scsicmd->cmnd[2] << 56) | |
1474 | ((u64)scsicmd->cmnd[3] << 48) | | 1474 | ((u64)scsicmd->cmnd[3] << 48) | |
@@ -1480,14 +1480,14 @@ static int aac_write(struct scsi_cmnd * scsicmd, int cid) | |||
1480 | count = (scsicmd->cmnd[10] << 24) | (scsicmd->cmnd[11] << 16) | | 1480 | count = (scsicmd->cmnd[10] << 24) | (scsicmd->cmnd[11] << 16) | |
1481 | (scsicmd->cmnd[12] << 8) | scsicmd->cmnd[13]; | 1481 | (scsicmd->cmnd[12] << 8) | scsicmd->cmnd[13]; |
1482 | } else if (scsicmd->cmnd[0] == WRITE_12) { /* 12 byte command */ | 1482 | } else if (scsicmd->cmnd[0] == WRITE_12) { /* 12 byte command */ |
1483 | dprintk((KERN_DEBUG "aachba: received a write(12) command on id %d.\n", cid)); | 1483 | dprintk((KERN_DEBUG "aachba: received a write(12) command on id %d.\n", scmd_id(scsicmd))); |
1484 | 1484 | ||
1485 | lba = ((u64)scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | 1485 | lba = ((u64)scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) |
1486 | | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5]; | 1486 | | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5]; |
1487 | count = (scsicmd->cmnd[6] << 24) | (scsicmd->cmnd[7] << 16) | 1487 | count = (scsicmd->cmnd[6] << 24) | (scsicmd->cmnd[7] << 16) |
1488 | | (scsicmd->cmnd[8] << 8) | scsicmd->cmnd[9]; | 1488 | | (scsicmd->cmnd[8] << 8) | scsicmd->cmnd[9]; |
1489 | } else { | 1489 | } else { |
1490 | dprintk((KERN_DEBUG "aachba: received a write(10) command on id %d.\n", cid)); | 1490 | dprintk((KERN_DEBUG "aachba: received a write(10) command on id %d.\n", scmd_id(scsicmd))); |
1491 | lba = ((u64)scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5]; | 1491 | lba = ((u64)scsicmd->cmnd[2] << 24) | (scsicmd->cmnd[3] << 16) | (scsicmd->cmnd[4] << 8) | scsicmd->cmnd[5]; |
1492 | count = (scsicmd->cmnd[7] << 8) | scsicmd->cmnd[8]; | 1492 | count = (scsicmd->cmnd[7] << 8) | scsicmd->cmnd[8]; |
1493 | } | 1493 | } |
@@ -1567,7 +1567,7 @@ static void synchronize_callback(void *context, struct fib *fibptr) | |||
1567 | cmd->scsi_done(cmd); | 1567 | cmd->scsi_done(cmd); |
1568 | } | 1568 | } |
1569 | 1569 | ||
1570 | static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) | 1570 | static int aac_synchronize(struct scsi_cmnd *scsicmd) |
1571 | { | 1571 | { |
1572 | int status; | 1572 | int status; |
1573 | struct fib *cmd_fibcontext; | 1573 | struct fib *cmd_fibcontext; |
@@ -1612,7 +1612,7 @@ static int aac_synchronize(struct scsi_cmnd *scsicmd, int cid) | |||
1612 | synchronizecmd = fib_data(cmd_fibcontext); | 1612 | synchronizecmd = fib_data(cmd_fibcontext); |
1613 | synchronizecmd->command = cpu_to_le32(VM_ContainerConfig); | 1613 | synchronizecmd->command = cpu_to_le32(VM_ContainerConfig); |
1614 | synchronizecmd->type = cpu_to_le32(CT_FLUSH_CACHE); | 1614 | synchronizecmd->type = cpu_to_le32(CT_FLUSH_CACHE); |
1615 | synchronizecmd->cid = cpu_to_le32(cid); | 1615 | synchronizecmd->cid = cpu_to_le32(scmd_id(scsicmd)); |
1616 | synchronizecmd->count = | 1616 | synchronizecmd->count = |
1617 | cpu_to_le32(sizeof(((struct aac_synchronize_reply *)NULL)->data)); | 1617 | cpu_to_le32(sizeof(((struct aac_synchronize_reply *)NULL)->data)); |
1618 | 1618 | ||
@@ -1760,7 +1760,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1760 | setinqstr(dev, (void *) (inq_data.inqd_vid), fsa_dev_ptr[cid].type); | 1760 | setinqstr(dev, (void *) (inq_data.inqd_vid), fsa_dev_ptr[cid].type); |
1761 | inq_data.inqd_pdt = INQD_PDT_DA; /* Direct/random access device */ | 1761 | inq_data.inqd_pdt = INQD_PDT_DA; /* Direct/random access device */ |
1762 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); | 1762 | aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); |
1763 | return aac_get_container_name(scsicmd, cid); | 1763 | return aac_get_container_name(scsicmd); |
1764 | } | 1764 | } |
1765 | case SERVICE_ACTION_IN: | 1765 | case SERVICE_ACTION_IN: |
1766 | if (!(dev->raw_io_interface) || | 1766 | if (!(dev->raw_io_interface) || |
@@ -1926,7 +1926,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1926 | min(sizeof(fsa_dev_ptr[cid].devname), | 1926 | min(sizeof(fsa_dev_ptr[cid].devname), |
1927 | sizeof(scsicmd->request->rq_disk->disk_name) + 1)); | 1927 | sizeof(scsicmd->request->rq_disk->disk_name) + 1)); |
1928 | 1928 | ||
1929 | return aac_read(scsicmd, cid); | 1929 | return aac_read(scsicmd); |
1930 | 1930 | ||
1931 | case WRITE_6: | 1931 | case WRITE_6: |
1932 | case WRITE_10: | 1932 | case WRITE_10: |
@@ -1934,11 +1934,11 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd) | |||
1934 | case WRITE_16: | 1934 | case WRITE_16: |
1935 | if (dev->in_reset) | 1935 | if (dev->in_reset) |
1936 | return -1; | 1936 | return -1; |
1937 | return aac_write(scsicmd, cid); | 1937 | return aac_write(scsicmd); |
1938 | 1938 | ||
1939 | case SYNCHRONIZE_CACHE: | 1939 | case SYNCHRONIZE_CACHE: |
1940 | /* Issue FIB to tell Firmware to flush it's cache */ | 1940 | /* Issue FIB to tell Firmware to flush it's cache */ |
1941 | return aac_synchronize(scsicmd, cid); | 1941 | return aac_synchronize(scsicmd); |
1942 | 1942 | ||
1943 | default: | 1943 | default: |
1944 | /* | 1944 | /* |