Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173719
b: refs/heads/master
c: 71ecb74
h: refs/heads/master
i:
  173717: aa895ab
  173715: 50c4243
  173711: 22080e8
v: v3
  • Loading branch information
Boaz Harrosh authored and James Bottomley committed Dec 4, 2009
1 parent 7e5ca82 commit ee8fb37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 2cdd6410e5a1665823f2a048fc7f8f6a8384be1d
refs/heads/master: 71ecb74b15377a6c0e0e6ea95d4b549580fb4d48
9 changes: 5 additions & 4 deletions trunk/drivers/scsi/osd/osd_initiator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1583,15 +1583,14 @@ int osd_req_decode_sense_full(struct osd_request *or,
{
struct osd_sense_attributes_data_descriptor
*osadd = cur_descriptor;
int len = min(cur_len, sense_len);
int i = 0;
unsigned len = min(cur_len, sense_len);
struct osd_sense_attr *pattr = osadd->sense_attrs;

while (len < 0) {
while (len >= sizeof(*pattr)) {
u32 attr_page = be32_to_cpu(pattr->attr_page);
u32 attr_id = be32_to_cpu(pattr->attr_id);

if (i++ == 0) {
if (!osi->attr.attr_page) {
osi->attr.attr_page = attr_page;
osi->attr.attr_id = attr_id;
}
Expand All @@ -1602,6 +1601,8 @@ int osd_req_decode_sense_full(struct osd_request *or,
bad_attr_list++;
max_attr--;
}

len -= sizeof(*pattr);
OSD_SENSE_PRINT2(
"osd_sense_attribute_identification"
"attr_page=0x%x attr_id=0x%x\n",
Expand Down

0 comments on commit ee8fb37

Please sign in to comment.