diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-05-09 19:23:11 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-05-10 12:24:14 -0400 |
commit | 213d7bbd76673fb1b26f1786af180bac07e57652 (patch) | |
tree | d4c150f778add3c46c4d98a943765db73428b13e | |
parent | 36abb3b18e26bf980e8529512853c5d73971a48b (diff) |
firewire: Drop single buffer request support.
The SCSI layer only passes sg requests down, so drop the
use_sg == 0, request_bufflen != 0 case.
Signed-off-by: Kristian Hoegsberg <krh@redhat.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index cb808d525314..e2ffbc87dcfe 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -976,34 +976,6 @@ static int sbp2_command_orb_map_scatterlist(struct sbp2_command_orb *orb) | |||
976 | return -ENOMEM; | 976 | return -ENOMEM; |
977 | } | 977 | } |
978 | 978 | ||
979 | static int sbp2_command_orb_map_buffer(struct sbp2_command_orb *orb) | ||
980 | { | ||
981 | struct sbp2_device *sd = | ||
982 | (struct sbp2_device *)orb->cmd->device->host->hostdata; | ||
983 | struct fw_unit *unit = sd->unit; | ||
984 | struct fw_device *device = fw_device(unit->device.parent); | ||
985 | |||
986 | /* | ||
987 | * As for map_scatterlist, we need to fill in the high bits of | ||
988 | * the data_descriptor pointer. | ||
989 | */ | ||
990 | |||
991 | orb->request_buffer_bus = | ||
992 | dma_map_single(device->card->device, | ||
993 | orb->cmd->request_buffer, | ||
994 | orb->cmd->request_bufflen, | ||
995 | orb->cmd->sc_data_direction); | ||
996 | if (dma_mapping_error(orb->request_buffer_bus)) | ||
997 | return -ENOMEM; | ||
998 | |||
999 | orb->request.data_descriptor.high = sd->address_high; | ||
1000 | orb->request.data_descriptor.low = orb->request_buffer_bus; | ||
1001 | orb->request.misc |= | ||
1002 | COMMAND_ORB_DATA_SIZE(orb->cmd->request_bufflen); | ||
1003 | |||
1004 | return 0; | ||
1005 | } | ||
1006 | |||
1007 | /* SCSI stack integration */ | 979 | /* SCSI stack integration */ |
1008 | 980 | ||
1009 | static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) | 981 | static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) |
@@ -1063,21 +1035,8 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done) | |||
1063 | orb->request.misc |= | 1035 | orb->request.misc |= |
1064 | COMMAND_ORB_DIRECTION(SBP2_DIRECTION_TO_MEDIA); | 1036 | COMMAND_ORB_DIRECTION(SBP2_DIRECTION_TO_MEDIA); |
1065 | 1037 | ||
1066 | if (cmd->use_sg) { | 1038 | if (cmd->use_sg && sbp2_command_orb_map_scatterlist(orb) < 0) |
1067 | if (sbp2_command_orb_map_scatterlist(orb) < 0) | ||
1068 | goto fail_map_payload; | ||
1069 | } else if (cmd->request_bufflen > SBP2_MAX_SG_ELEMENT_LENGTH) { | ||
1070 | /* | ||
1071 | * FIXME: Need to split this into a sg list... but | ||
1072 | * could we get the scsi or blk layer to do that by | ||
1073 | * reporting our max supported block size? | ||
1074 | */ | ||
1075 | fw_error("command > 64k\n"); | ||
1076 | goto fail_map_payload; | 1039 | goto fail_map_payload; |
1077 | } else if (cmd->request_bufflen > 0) { | ||
1078 | if (sbp2_command_orb_map_buffer(orb) < 0) | ||
1079 | goto fail_map_payload; | ||
1080 | } | ||
1081 | 1040 | ||
1082 | fw_memcpy_to_be32(&orb->request, &orb->request, sizeof orb->request); | 1041 | fw_memcpy_to_be32(&orb->request, &orb->request, sizeof orb->request); |
1083 | 1042 | ||