aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2008-02-28 14:52:02 -0500
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-04-18 11:55:32 -0400
commit0d7dcbf2a3b6042351948ecf1f171eb3f1d72cd3 (patch)
treee9d029fe7bc10224ce760321d7a875c78e3e3ada /drivers
parent71ee9f01f2bc2b717dacc69c85f257e1efff12ee (diff)
firewire: fw-sbp2: simplify some macros
How hard can it be to switch on one bit? :-) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/fw-sbp2.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 30216020264..d1bdf1807c4 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -175,9 +175,6 @@ struct sbp2_target {
175#define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 175#define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000
176#define SBP2_RETRY_LIMIT 0xf /* 15 retries */ 176#define SBP2_RETRY_LIMIT 0xf /* 15 retries */
177 177
178#define SBP2_DIRECTION_TO_MEDIA 0x0
179#define SBP2_DIRECTION_FROM_MEDIA 0x1
180
181/* Unit directory keys */ 178/* Unit directory keys */
182#define SBP2_CSR_UNIT_CHARACTERISTICS 0x3a 179#define SBP2_CSR_UNIT_CHARACTERISTICS 0x3a
183#define SBP2_CSR_FIRMWARE_REVISION 0x3c 180#define SBP2_CSR_FIRMWARE_REVISION 0x3c
@@ -273,7 +270,7 @@ struct sbp2_login_response {
273#define COMMAND_ORB_PAGE_TABLE_PRESENT ((1) << 19) 270#define COMMAND_ORB_PAGE_TABLE_PRESENT ((1) << 19)
274#define COMMAND_ORB_MAX_PAYLOAD(v) ((v) << 20) 271#define COMMAND_ORB_MAX_PAYLOAD(v) ((v) << 20)
275#define COMMAND_ORB_SPEED(v) ((v) << 24) 272#define COMMAND_ORB_SPEED(v) ((v) << 24)
276#define COMMAND_ORB_DIRECTION(v) ((v) << 27) 273#define COMMAND_ORB_DIRECTION ((1) << 27)
277#define COMMAND_ORB_REQUEST_FORMAT(v) ((v) << 29) 274#define COMMAND_ORB_REQUEST_FORMAT(v) ((v) << 29)
278#define COMMAND_ORB_NOTIFY ((1) << 31) 275#define COMMAND_ORB_NOTIFY ((1) << 31)
279 276
@@ -1472,11 +1469,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, scsi_done_fn_t done)
1472 COMMAND_ORB_NOTIFY); 1469 COMMAND_ORB_NOTIFY);
1473 1470
1474 if (cmd->sc_data_direction == DMA_FROM_DEVICE) 1471 if (cmd->sc_data_direction == DMA_FROM_DEVICE)
1475 orb->request.misc |= cpu_to_be32( 1472 orb->request.misc |= cpu_to_be32(COMMAND_ORB_DIRECTION);
1476 COMMAND_ORB_DIRECTION(SBP2_DIRECTION_FROM_MEDIA));
1477 else if (cmd->sc_data_direction == DMA_TO_DEVICE)
1478 orb->request.misc |= cpu_to_be32(
1479 COMMAND_ORB_DIRECTION(SBP2_DIRECTION_TO_MEDIA));
1480 1473
1481 if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0) 1474 if (scsi_sg_count(cmd) && sbp2_map_scatterlist(orb, device, lu) < 0)
1482 goto out; 1475 goto out;