From: Arjan van de Ven <arjanv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Salyzyn, Mark" <mark_salyzyn-ugMvIWC9OiRBDgjK7y7TUQ@public.gmane.org>
Cc: 'Xose Vazquez Perez'
<xose-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>,
"'linux-aacraid-devel-XtjxT7Vmt5ZskZv2Y/7f+AC/G2K4zDHf@public.gmane.org'"
<linux-aacraid-devel-XtjxT7Vmt5ZskZv2Y/7f+AC/G2K4zDHf@public.gmane.org>,
'linux-scsi' <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] 1.1.4-2313 aacraid driver for LiNUX 2.4.25-pre4
Date: Wed, 7 Jan 2004 21:51:21 +0100 [thread overview]
Message-ID: <20040107205121.GA19162@devserv.devel.redhat.com> (raw)
In-Reply-To: <C2CB6D8BA015124783C0EB9B33D24FFD047F90-b070rUroPABnRV3uFxCcHmPGcypz5H/V@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3126 bytes --]
On Wed, Jan 07, 2004 at 03:12:44PM -0500, Salyzyn, Mark wrote:
> +#define aac_spin_lock_irq(host_lock)
> spin_lock_irq(&io_request_lock)
> +#define aac_spin_unlock_irqrestore(host_lock, cpu_flags)
> spin_unlock_irqrestore(&io_request_lock, cpu_flags)
> +#define aac_spin_unlock_irq(host_lock)
> spin_unlock_irq(&io_request_lock)
>
>
> ewwww
>
> mgs> In Adaptec's version of the code, this is part of a kernel versioning
> mgs> ifdef, to use the `host_lock' passed in, or the io_request_lock global
> mgs> Better here than at each locale. However, I think I chose the wrong
> mgs> side of the ifdef, doesn't 2.4.25-pre4 use host->host_lock?
there are other, cleaner ways to achieve this imo
> + * bit addressing, and we have more than 32 bit addressing worth of
> + * memory and if the controller supports 64 bit scatter gather
> elements.
> + */
> + if( (sizeof(dma_addr_t) > 4) && (num_physpages > (0xFFFFFFFFULL >>
> PAGE_SHIFT)) && (dev->adapter_info.options &
> + dev->dac_support = 1;
> }
>
> that looks broken, at least drivers should never need to check num_physpages
> etc etc
>
> mgs> If the system has less than 4G of memory, it is in the interest of
> mgs> performance to use the 32 bit variants of the adapter packets. Smaller
> mgs> frames, and capable of a larger number of scatter-gather elements.
oh sure; imo the pci_set_dma_mask() function should check this, not the
driver.
> why on earth is that in a driver?????
>
> mgs> The management tools issue ioctls to query for the information. RAID
> mgs> drivers require management tool support.
sounds like a really really broken ioctl interface then. Is the source of
these tools public so that we can fix them ?
>
> +# define strlcpy(s1,s2,n) strncpy(s1,s2,n);s1[n-1]='\0'
>
>
> this is very broken; consider
>
> if (foo)
> bar(foo);
> else
> strlcpy(foo,bar,3);
>
> mgs> this is `good enough' for the driver, s1 in the driver context is
> mgs> not a value of null.
ehm read again. My example was not of the foo==NULL case but that your
define had 2 statements where the "else" will only apply to the first
> mgs> This is in here for compatibility reasons (should be in compat.h),
> mgs> could be dropped as min is defined by the include framework. This
> mgs> `minimal' definition is good enough for the driver since locally
> mgs> both a and b are `constants'.
then use the exact 2.4/2.6 definition in a compat.h or so...
> mgs> Only the __x86_64__ architecture has the register_ioctl32_conversion
> mgs> handler. This is reflection of what has been tested with the currently
> mgs> available management tools. The only 64 bit architecture that has
> mgs> the management tools compiled as a 64 bit applications is for the AMD64
> mgs> right now. I have not yet determined how to figure out if a 32 bit
> mgs> legacy app or a 64 bit updated app has issued the ioctl call to the
> mgs> driver under other architectures.
yep that's what I call fishy ;)
broken ioctls for a broken interface ;(
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-01-07 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 20:12 [PATCH] 1.1.4-2313 aacraid driver for LiNUX 2.4.25-pre4 Salyzyn, Mark
[not found] ` <C2CB6D8BA015124783C0EB9B33D24FFD047F90-b070rUroPABnRV3uFxCcHmPGcypz5H/V@public.gmane.org>
2004-01-07 20:51 ` Arjan van de Ven [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-01-07 18:12 Xose Vazquez Perez
[not found] ` <3FFC4C09.3020103-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
2004-01-07 18:42 ` Arjan van de Ven
2004-01-07 21:00 ` Christoph Hellwig
2004-01-08 15:58 ` Xose Vazquez Perez
[not found] ` <3FFD7E3A.3010808-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
2004-01-08 16:04 ` Christoph Hellwig
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=20040107205121.GA19162@devserv.devel.redhat.com \
--to=arjanv-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-aacraid-devel-XtjxT7Vmt5ZskZv2Y/7f+AC/G2K4zDHf@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark_salyzyn-ugMvIWC9OiRBDgjK7y7TUQ@public.gmane.org \
--cc=xose-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org \
/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.