Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294121
b: refs/heads/master
c: 6503de6
h: refs/heads/master
i:
  294119: 490001b
v: v3
  • Loading branch information
Chris Boot authored and Stefan Richter committed Feb 22, 2012
1 parent 6433193 commit 47144f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74044563a2318f2c56fa53af64f7800f49fb479d
refs/heads/master: 6503de65459da619d3ade0824c9cc17ea0a57141
13 changes: 11 additions & 2 deletions trunk/drivers/firewire/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,10 +1309,19 @@ static void sbp2_unmap_scatterlist(struct device *card_device,
static unsigned int sbp2_status_to_sense_data(u8 *sbp2_status, u8 *sense_data)
{
int sam_status;
int sfmt = (sbp2_status[0] >> 6) & 0x03;

sense_data[0] = 0x70;
if (sfmt == 2 || sfmt == 3) {
/*
* Reserved for future standardization (2) or
* Status block format vendor-dependent (3)
*/
return DID_ERROR << 16;
}

sense_data[0] = 0x70 | sfmt | (sbp2_status[1] & 0x80);
sense_data[1] = 0x0;
sense_data[2] = sbp2_status[1];
sense_data[2] = ((sbp2_status[1] << 1) & 0xe0) | (sbp2_status[1] & 0x0f);
sense_data[3] = sbp2_status[4];
sense_data[4] = sbp2_status[5];
sense_data[5] = sbp2_status[6];
Expand Down

0 comments on commit 47144f7

Please sign in to comment.