Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sun, 16 Mar 2003 13:25:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sun, 16 Mar 2003 13:25:49 -0500 Received: from mail2.sonytel.be ([195.0.45.172]:56813 "EHLO mail.sonytel.be") by vger.kernel.org with ESMTP id ; Sun, 16 Mar 2003 13:25:48 -0500 Date: Sun, 16 Mar 2003 19:36:32 +0100 (MET) From: Geert Uytterhoeven To: James Bottomley cc: Osamu Tomita , Linux Kernel Mailing List , Alan Cox , Christoph Hellwig Subject: Re: Complete support PC-9800 for 2.5.64-ac4 (11/11) SCSI In-Reply-To: <1047836839.9267.29.camel@mulgrave> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 44 On 16 Mar 2003, James Bottomley wrote: > On Sat, 2003-03-15 at 19:15, Osamu Tomita wrote: > > /* 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? On m68k and MIPS, we do not derefence SASR to get the port number, SASR _is_ the MMIO pointer to the 8-bit SASR register. Hence you access the register by dereferencing the pointer. > Perhaps the better thing to do is to make your driver use an unsigned > int *, so the dereference works in all cases. Actually, it was my suggestion to remove the dereference for PIO accesses. In that case SASR contains the I/O port register. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/