From: James Bottomley <James.Bottomley@steeleye.com>
To: Jeremy Higdon <jeremy@sgi.com>
Cc: Martin Hicks <mort@wildopensource.com>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Transport Attributes -- attempt#4
Date: 25 Feb 2004 10:42:47 -0600 [thread overview]
Message-ID: <1077727369.1804.208.camel@mulgrave> (raw)
In-Reply-To: <20040225070847.GA504005@sgi.com>
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
On Wed, 2004-02-25 at 01:08, Jeremy Higdon wrote:
> What I meant to say is that I get a compile error at the following
> line in scsi_scan.c:
>
> sdev = kmalloc(sizeof(*sdev) + shost->transportt->size, GFP_ATOMIC);
Er, oops, I forgot to do a bk diff in include/scsi. It should be
attached, sorry.
James
[-- Attachment #2: tmp.diff --]
[-- Type: text/plain, Size: 2051 bytes --]
===== include/scsi/scsi_device.h 1.12 vs edited =====
--- 1.12/include/scsi/scsi_device.h Mon Feb 23 14:41:39 2004
+++ edited/include/scsi/scsi_device.h Mon Feb 23 15:39:55 2004
@@ -103,11 +103,11 @@
struct device sdev_gendev;
struct class_device sdev_classdev;
- void *transport_attr_values;
struct class_device transport_classdev;
enum scsi_device_state sdev_state;
-};
+ unsigned long transport_data[0];
+} __attribute__((aligned(sizeof(unsigned long))));
#define to_scsi_device(d) \
container_of(d, struct scsi_device, sdev_gendev)
#define class_to_sdev(d) \
===== include/scsi/scsi_transport.h 1.1 vs edited =====
--- 1.1/include/scsi/scsi_transport.h Mon Feb 23 14:41:44 2004
+++ edited/include/scsi/scsi_transport.h Mon Feb 23 15:32:33 2004
@@ -32,9 +32,10 @@
/* Constructor/Destructor functions */
int (* setup)(struct scsi_device *);
void (* cleanup)(struct scsi_device *);
-
- /* Default values for the transport attributes */
- void *default_attr_values;
+ /* The size of the specific transport attribute structure (a
+ * space of this size will be left at the end of the
+ * scsi_device structure */
+ int size;
};
#endif /* SCSI_TRANSPORT_H */
===== include/scsi/scsi_transport_spi.h 1.1 vs edited =====
--- 1.1/include/scsi/scsi_transport_spi.h Mon Feb 23 14:41:48 2004
+++ edited/include/scsi/scsi_transport_spi.h Mon Feb 23 15:56:50 2004
@@ -29,14 +29,10 @@
int offset;
};
-extern struct scsi_transport_template spi_transport_template;
+/* accessor functions */
+#define spi_period(x) (((struct spi_transport_attrs *)&(x)->transport_data)->period)
+#define spi_offset(x) (((struct spi_transport_attrs *)&(x)->transport_data)->offset)
-#ifdef CONFIG_SCSI_SPI_ATTRS
-extern int scsi_spi_transport_init(void);
-extern void scsi_spi_transport_exit(void);
-#else
-# define scsi_spi_transport_init() 0
-# define scsi_spi_transport_exit()
-#endif
+extern struct scsi_transport_template spi_transport_template;
#endif /* SCSI_TRANSPORT_SPI_H */
next prev parent reply other threads:[~2004-02-25 16:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-20 21:56 Transport Attributes -- attempt#4 Martin Hicks
2004-01-20 23:48 ` Patrick Mansfield
2004-02-24 0:17 ` James Bottomley
2004-02-24 5:58 ` Jeremy Higdon
2004-02-24 15:02 ` James Bottomley
2004-02-25 7:08 ` Jeremy Higdon
2004-02-25 16:42 ` James Bottomley [this message]
2004-03-04 16:14 ` Martin Hicks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1077727369.1804.208.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=jeremy@sgi.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mort@wildopensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.