X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2F53c700.h;h=f7693d7c8eec59ba8b21ac17dd774ce13a0129eb;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=b357a4aeb11d057eb68f3856c458066a79f6c259;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index b357a4aeb..f7693d7c8 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h @@ -60,7 +60,8 @@ struct NCR_700_Host_Parameters; /* These are the externally used routines */ struct Scsi_Host *NCR_700_detect(struct scsi_host_template *, - struct NCR_700_Host_Parameters *); + struct NCR_700_Host_Parameters *, struct device *, + unsigned long, u8); int NCR_700_release(struct Scsi_Host *host); irqreturn_t NCR_700_intr(int, void *, struct pt_regs *); @@ -101,7 +102,6 @@ struct NCR_700_SG_List { * 18 device supports tag queueing */ #define NCR_700_DEV_NEGOTIATED_SYNC (1<<16) #define NCR_700_DEV_BEGIN_SYNC_NEGOTIATION (1<<17) -#define NCR_700_DEV_BEGIN_TAG_QUEUEING (1<<18) #define NCR_700_DEV_PRINT_SYNC_NEGOTIATION (1<<19) static inline void @@ -121,22 +121,43 @@ NCR_700_get_depth(struct scsi_device *SDp) static inline int NCR_700_is_flag_set(struct scsi_device *SDp, __u32 flag) { - return (((unsigned long)SDp->hostdata) & flag) == flag; + return (spi_flags(SDp->sdev_target) & flag) == flag; } static inline int NCR_700_is_flag_clear(struct scsi_device *SDp, __u32 flag) { - return (((unsigned long)SDp->hostdata) & flag) == 0; + return (spi_flags(SDp->sdev_target) & flag) == 0; } static inline void NCR_700_set_flag(struct scsi_device *SDp, __u32 flag) { - SDp->hostdata = (void *)((long)SDp->hostdata | (flag & 0xffff0000)); + spi_flags(SDp->sdev_target) |= flag; } static inline void NCR_700_clear_flag(struct scsi_device *SDp, __u32 flag) { - SDp->hostdata = (void *)((long)SDp->hostdata & ~(flag & 0xffff0000)); + spi_flags(SDp->sdev_target) &= ~flag; +} + +enum NCR_700_tag_neg_state { + NCR_700_START_TAG_NEGOTIATION = 0, + NCR_700_DURING_TAG_NEGOTIATION = 1, + NCR_700_FINISHED_TAG_NEGOTIATION = 2, +}; + +static inline enum NCR_700_tag_neg_state +NCR_700_get_tag_neg_state(struct scsi_device *SDp) +{ + return (enum NCR_700_tag_neg_state)((spi_flags(SDp->sdev_target)>>20) & 0x3); +} + +static inline void +NCR_700_set_tag_neg_state(struct scsi_device *SDp, + enum NCR_700_tag_neg_state state) +{ + /* clear the slot */ + spi_flags(SDp->sdev_target) &= ~(0x3 << 20); + spi_flags(SDp->sdev_target) |= ((__u32)state) << 20; } struct NCR_700_command_slot {