public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: Osamu Tomita <tomita@cinet.co.jp>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Christoph Hellwig <hch@infradead.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: Complete support PC-9800 for 2.5.64-ac4 (11/11) SCSI
Date: 16 Mar 2003 11:47:16 -0600	[thread overview]
Message-ID: <1047836839.9267.29.camel@mulgrave> (raw)
In-Reply-To: <20030316011550.GK1592@yuzuki.cinet.co.jp>

On Sat, 2003-03-15 at 19:15, Osamu Tomita wrote:
> This is the patch to support NEC PC-9800 subarchitecture
> against 2.5.64-ac4. (11/11)
> 
> SCSI host adapter support.
>  - BIOS parameter change for PC98.
>  - Add pc980155 driver for old PC98.
>  - wd33c93.c update error handler for eh_*.
>  - wd33c93.h register to int for PIO mode.

I suppose the first thing to point out is that it would be helpful if
you could send this to linux-scsi@vger.kernel.org.  Although most SCSI
people also read linux-kernel, it is easy to lose things in the noise.

> diff -Nru linux/drivers/scsi/sd.c linux98/drivers/scsi/sd.c
> --- linux/drivers/scsi/sd.c	2003-03-05 12:29:32.000000000 +0900
> +++ linux98/drivers/scsi/sd.c	2003-03-08 11:13:28.000000000 +0900
> @@ -485,6 +485,15 @@
>  	else
>  		scsicam_bios_param(bdev, sdkp->capacity, diskinfo);
>  
> +#ifdef CONFIG_X86_PC9800
> +	{
> +		extern int pc98_bios_param(struct scsi_device *,
> +					   struct block_device *,
> +					   sector_t, int *);
> +		pc98_bios_param(sdp, bdev, sdkp->capacity, diskinfo);
> +	}
> +#endif
> +
>  	if (put_user(diskinfo[0], &loc->heads))
>  		return -EFAULT;
>  	if (put_user(diskinfo[1], &loc->sectors))

You already have the pc98_bios_param as part of your local driver.  Why
do you need this in addition?

[...]
>  static inline uchar
>  read_aux_stat(const wd33c93_regs regs)
>  {
> -	return inb(*regs.SASR);
> +	return inb(regs.SASR);
>  }
>  
>  static inline void
>  write_wd33c93(const wd33c93_regs regs, uchar reg_num, uchar value)
>  {
> -      outb(reg_num, *regs.SASR);
> -      outb(value, *regs.SCMD);
> +      outb(reg_num, regs.SASR);
> +      outb(value, regs.SCMD);
>  }
>  
[...]
>     /* This is what the 3393 chip looks like to us */
>  typedef struct {
> +#ifdef CONFIG_WD33C93_PIO
> +   unsigned int   SASR;
> +   unsigned int   SCMD;
> +#else
>     volatile unsigned char  *SASR;
>     volatile unsigned char  *SCMD;
> +#endif
>  } wd33c93_regs;
>  

This really doesn't look right.  For non PIO (which is all drivers apart
from yours), they expect to dereference SASR to get the port number (as
an unsigned char).  If you remove the dereference, don't they all break?

Perhaps the better thing to do is to make your driver use an unsigned
int *, so the dereference works in all cases.

James


  reply	other threads:[~2003-03-16 17:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-16  0:16 Complete support PC-9800 for 2.5.64-ac4 (0/11) summary Osamu Tomita
2003-03-16  1:02 ` Complete support PC-9800 for 2.5.64-ac4 (1/11) console Osamu Tomita
2003-03-16  1:03 ` Complete support PC-9800 for 2.5.64-ac4 (2/11) misc core Osamu Tomita
2003-03-16  1:04 ` Complete support PC-9800 for 2.5.64-ac4 (3/11) DMA Osamu Tomita
2003-03-16  1:04 ` Complete support PC-9800 for 2.5.64-ac4 (4/11) IDE Osamu Tomita
2003-03-16  1:05 ` Complete support PC-9800 for 2.5.64-ac4 (5/11) kanji Osamu Tomita
2003-03-16  1:06 ` Complete support PC-9800 for 2.5.64-ac4 (6/11) Kconfig Osamu Tomita
2003-03-16  1:11 ` Complete support PC-9800 for 2.5.64-ac4 (7/11) NIC Osamu Tomita
2003-03-16  1:12 ` Complete support PC-9800 for 2.5.64-ac4 (8/11) parport Osamu Tomita
2003-03-16  1:13 ` Complete support PC-9800 for 2.5.64-ac4 (9/11) PCI Osamu Tomita
2003-03-16  1:14 ` Complete support PC-9800 for 2.5.64-ac4 (10/11) PCMCIA Osamu Tomita
2003-03-16  1:15 ` Complete support PC-9800 for 2.5.64-ac4 (11/11) SCSI Osamu Tomita
2003-03-16 17:47   ` James Bottomley [this message]
2003-03-16 18:36     ` Geert Uytterhoeven
2003-03-16 18:54       ` James Bottomley
2003-03-16 20:00         ` Geert Uytterhoeven
2003-03-16 22:26           ` James Bottomley
2003-03-17 10:25             ` Geert Uytterhoeven
  -- strict thread matches above, loose matches on Subject: below --
2003-03-17  1:22 Osamu Tomita

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=1047836839.9267.29.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomita@cinet.co.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox