Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136263
b: refs/heads/master
c: f290f19
h: refs/heads/master
i:
  136261: 56ed92a
  136259: b3039d9
  136255: 02c7edf
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Mar 12, 2009
1 parent e24a8d7 commit ad29e6d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 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: 97218a1499391b174ea95e05b7a40fbb73e79813
refs/heads/master: f290f1970f01287eaaffc798a677594a57ebd65e
1 change: 1 addition & 0 deletions trunk/block/cmd-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/spinlock.h>
#include <linux/capability.h>
#include <linux/bitops.h>
#include <linux/blkdev.h>

#include <scsi/scsi.h>
#include <linux/cdrom.h>
Expand Down
19 changes: 2 additions & 17 deletions trunk/include/scsi/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
#define _SCSI_SCSI_H

#include <linux/types.h>
#include <scsi/scsi_cmnd.h>

struct scsi_cmnd;

/*
* The maximum number of SG segments that we will put inside a
Expand Down Expand Up @@ -439,22 +440,6 @@ static inline int scsi_is_wlun(unsigned int lun)
#define host_byte(result) (((result) >> 16) & 0xff)
#define driver_byte(result) (((result) >> 24) & 0xff)

static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 8;
}

static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 16;
}

static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 24;
}


#define sense_class(sense) (((sense) >> 4) & 0x7)
#define sense_error(sense) ((sense) & 0xf)
#define sense_valid(sense) ((sense) & 0x80);
Expand Down
15 changes: 15 additions & 0 deletions trunk/include/scsi/scsi_cmnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,19 @@ static inline struct scsi_data_buffer *scsi_prot(struct scsi_cmnd *cmd)
#define scsi_for_each_prot_sg(cmd, sg, nseg, __i) \
for_each_sg(scsi_prot_sglist(cmd), sg, nseg, __i)

static inline void set_msg_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 8;
}

static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 16;
}

static inline void set_driver_byte(struct scsi_cmnd *cmd, char status)
{
cmd->result |= status << 24;
}

#endif /* _SCSI_SCSI_CMND_H */

0 comments on commit ad29e6d

Please sign in to comment.