Commit 5a2602de authored by Adrian Bunk's avatar Adrian Bunk Committed by Christoph Hellwig

[PATCH] SCSI dc395x.c: fix inline compile errors

Trying to compile drivers/scsi/dc395x.c in 2.6.8-rc1-mm1 using gcc 3.4
results in compile errors starting with the following:

<--  snip  -->

...
  CC      drivers/scsi/dc395x.o
drivers/scsi/dc395x.c: In function `dc395x_handle_interrupt':
drivers/scsi/dc395x.c:388: sorry, unimplemented: inlining failed in call
to 'enable_msgout_abort': function body not available
drivers/scsi/dc395x.c:1740: sorry, unimplemented: called from here
make[2]: *** [drivers/scsi/dc395x.o] Error 1

<--  snip  -->


The patch below moves enable_msgout_abort above the place where it is
called the first time and removes the bogus inline from the prototype of
set_xfer_rate (the function itself isn't marked as inline).

An alternative approach would be to remove the inline from
enable_msgout_abort.
Signed-off-by: default avatarAdrian Bunk <bunk@fs.tum.de>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 5caa8475
......@@ -376,6 +376,8 @@ static void disconnect(struct AdapterCtlBlk *acb);
static void reselect(struct AdapterCtlBlk *acb);
static u8 start_scsi(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb);
static void build_srb(struct scsi_cmnd *cmd, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_code,
......@@ -384,13 +386,11 @@ static void scsi_reset_detect(struct AdapterCtlBlk *acb);
static void pci_unmap_srb(struct AdapterCtlBlk *acb, struct ScsiReqBlk *srb);
static void pci_unmap_srb_sense(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb);
static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb);
static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
static void request_sense(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
struct ScsiReqBlk *srb);
static inline void set_xfer_rate(struct AdapterCtlBlk *acb,
static void set_xfer_rate(struct AdapterCtlBlk *acb,
struct DeviceCtlBlk *dcb);
static void waiting_timeout(unsigned long ptr);
......@@ -1676,6 +1676,23 @@ static u8 start_scsi(struct AdapterCtlBlk* acb, struct DeviceCtlBlk* dcb,
}
#define DC395x_ENABLE_MSGOUT \
DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \
srb->state |= SRB_MSGOUT
/* abort command */
static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb)
{
srb->msgout_buf[0] = ABORT;
srb->msg_count = 1;
DC395x_ENABLE_MSGOUT;
srb->state &= ~SRB_MSGIN;
srb->state |= SRB_MSGOUT;
}
/**
* dc395x_handle_interrupt - Handle an interrupt that has been confirmed to
* have been triggered for this card.
......@@ -2583,11 +2600,6 @@ static inline u8 msgin_completed(u8 * msgbuf, u32 len)
return 1;
}
#define DC395x_ENABLE_MSGOUT \
DC395x_write16 (acb, TRM_S1040_SCSI_CONTROL, DO_SETATN); \
srb->state |= SRB_MSGOUT
/* reject_msg */
static inline void msgin_reject(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb)
......@@ -2603,18 +2615,6 @@ static inline void msgin_reject(struct AdapterCtlBlk *acb,
}
/* abort command */
static inline void enable_msgout_abort(struct AdapterCtlBlk *acb,
struct ScsiReqBlk *srb)
{
srb->msgout_buf[0] = ABORT;
srb->msg_count = 1;
DC395x_ENABLE_MSGOUT;
srb->state &= ~SRB_MSGIN;
srb->state |= SRB_MSGOUT;
}
static struct ScsiReqBlk *msgin_qtag(struct AdapterCtlBlk *acb,
struct DeviceCtlBlk *dcb, u8 tag)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment