All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Seewer Philippe" <philippe.seewer@bfh.ch>
To: matthew@wil.cx
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] sym53c8xx_2: Add bios_param to sym_glue.c
Date: Fri, 17 Feb 2006 15:10:43 +0100	[thread overview]
Message-ID: <43F5D963.9080009@bfh.ch> (raw)


This patch adds the scsi common function bios_param to the sym53c8xx
driver. For simplicity i just copied the code from the sym53c416 driver.

Patch applies to 2.6.16-rc3

Signed-off-by: Seewer Philippe <philippe.seewer@bfh.ch>


--- linux-2.6.16-rc3/drivers/scsi/sym53c8xx_2/sym_glue.c.orig   2006-02-17 14:49:12.000000000 +0100
+++ linux-2.6.16-rc3/drivers/scsi/sym53c8xx_2/sym_glue.c        2006-02-17 14:50:55.000000000 +0100
@@ -1963,6 +1963,28 @@ static int sym_detach(struct sym_hcb *np
 }

 /*
+ * Bios param for sd.
+ * Copied from sym53c416 driver
+ */
+static int sym53c8xx_bios_param(struct scsi_device *sdev,
+               struct block_device *dev,
+               sector_t capacity, int *ip)
+{
+       int size;
+
+       size = capacity;
+       ip[0] = 64;                             /* heads                        */
+       ip[1] = 32;                             /* sectors                      */
+       if((ip[2] = size >> 11) > 1024)         /* cylinders, test for big disk */
+       {
+               ip[0] = 255;                    /* heads                        */
+               ip[1] = 63;                     /* sectors                      */
+               ip[2] = size / (255 * 63);      /* cylinders                    */
+       }
+       return 0;
+}
+
+/*
  * Driver host template.
  */
 static struct scsi_host_template sym2_template = {
@@ -1977,6 +1999,7 @@ static struct scsi_host_template sym2_te
        .eh_device_reset_handler = sym53c8xx_eh_device_reset_handler,
        .eh_bus_reset_handler   = sym53c8xx_eh_bus_reset_handler,
        .eh_host_reset_handler  = sym53c8xx_eh_host_reset_handler,
+       .bios_param             = sym53c8xx_bios_param,
        .this_id                = 7,
        .use_clustering         = DISABLE_CLUSTERING,
 #ifdef SYM_LINUX_PROC_INFO_SUPPORT

WARNING: multiple messages have this Message-ID (diff)
From: "Seewer Philippe" <philippe.seewer@bfh.ch>
To: <matthew@wil.cx>
Cc: <linux-kernel@vger.kernel.org>, <linux-scsi@vger.kernel.org>
Subject: [PATCH] sym53c8xx_2: Add bios_param to sym_glue.c
Date: Fri, 17 Feb 2006 15:10:43 +0100	[thread overview]
Message-ID: <43F5D963.9080009@bfh.ch> (raw)


This patch adds the scsi common function bios_param to the sym53c8xx
driver. For simplicity i just copied the code from the sym53c416 driver.

Patch applies to 2.6.16-rc3

Signed-off-by: Seewer Philippe <philippe.seewer@bfh.ch>


--- linux-2.6.16-rc3/drivers/scsi/sym53c8xx_2/sym_glue.c.orig   2006-02-17 14:49:12.000000000 +0100
+++ linux-2.6.16-rc3/drivers/scsi/sym53c8xx_2/sym_glue.c        2006-02-17 14:50:55.000000000 +0100
@@ -1963,6 +1963,28 @@ static int sym_detach(struct sym_hcb *np
 }

 /*
+ * Bios param for sd.
+ * Copied from sym53c416 driver
+ */
+static int sym53c8xx_bios_param(struct scsi_device *sdev,
+               struct block_device *dev,
+               sector_t capacity, int *ip)
+{
+       int size;
+
+       size = capacity;
+       ip[0] = 64;                             /* heads                        */
+       ip[1] = 32;                             /* sectors                      */
+       if((ip[2] = size >> 11) > 1024)         /* cylinders, test for big disk */
+       {
+               ip[0] = 255;                    /* heads                        */
+               ip[1] = 63;                     /* sectors                      */
+               ip[2] = size / (255 * 63);      /* cylinders                    */
+       }
+       return 0;
+}
+
+/*
  * Driver host template.
  */
 static struct scsi_host_template sym2_template = {
@@ -1977,6 +1999,7 @@ static struct scsi_host_template sym2_te
        .eh_device_reset_handler = sym53c8xx_eh_device_reset_handler,
        .eh_bus_reset_handler   = sym53c8xx_eh_bus_reset_handler,
        .eh_host_reset_handler  = sym53c8xx_eh_host_reset_handler,
+       .bios_param             = sym53c8xx_bios_param,
        .this_id                = 7,
        .use_clustering         = DISABLE_CLUSTERING,
 #ifdef SYM_LINUX_PROC_INFO_SUPPORT

             reply	other threads:[~2006-02-17 14:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 14:10 Seewer Philippe [this message]
2006-02-17 14:10 ` [PATCH] sym53c8xx_2: Add bios_param to sym_glue.c Seewer Philippe
2006-02-17 14:37 ` Matthew Wilcox
2006-02-17 14:41   ` Seewer Philippe
2006-02-17 14:41     ` Seewer Philippe

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=43F5D963.9080009@bfh.ch \
    --to=philippe.seewer@bfh.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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.