public inbox for gentoo-sparc@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ivan Kabaivanov <chepati@yahoo.com>
To: gentoo-sparc@lists.gentoo.org
Subject: Re: [gentoo-sparc] QLA2xxx
Date: Thu, 21 Feb 2008 15:56:47 -0500	[thread overview]
Message-ID: <200802211556.47439.chepati@yahoo.com> (raw)
In-Reply-To: <1203623434.1376.11.camel@opher>

On Thursday 21 February 2008 14:50, Friedrich Oslage wrote:
> Hi,
>
> > The problem comes from the fact that the firmware is in the disk at
> > /lib/firmware starting from kernel 2.6.18 or something. If you boot
> > the 2617 from the CD it will probably work fine.
> > Anyway even creating a proper initrd with that /lib/firmware the
> > kernel does not load it. Don't know why.
>
> Using an initrd works fine for me, you probably just forgot to put udev
> in it.
>
> My initrd basicly looks like this:
> /dev/console
> /dev/null
> /bin/busybox
> /bin/udevd
> /lib/udev/firmware.sh
> /lib/udev/udev.conf
> /lib/udev/rules.d/50-udev.rules
> /firmware/ql2200_fw.bin
> /lib/modules/`uname -r`/modules.dep
> /lib/modules/`uname -r`/kernel/drivers/scsi/qla2xxx/qla2xxx.ko
> /linuxrc
>
> The script I used to create it is available @
> http://porno-bullen.de/~bluebird/initrd-qla2xxx/ but don't blame me if
> it doesn't work ;)
>
> Cheers,
> bluebird


This is the preferred method -- to let udev handle the firmware loading.  
However if you don't have udev in the initrd or it doesn't work, all is not 
lost.  There's a way to manually load the firmware, but it's tricky.  It's 
tricky because you have to be very quick -- you'll have maybe up to 4-5 
seconds to load the firmware.  Here's how:

1) boot the machine (either with an initrd from the hard drive or with an 
installation cd.)
2) drop to a shell somehow -- I don't run gentoo so I don't know if the 
installer has this option but debian does and so does ubuntu for sparc.
3) Load qla2xxx.ko (just modprobe qla2xxx)
4) Find out the device path in /sys (on my sunfire280r 
it's /sys/devices/pci0001\:00/0001\:00\:04.0/)  It might take you a few tries 
to find out.  Look for a file /sys/devices/pci0001:00/0001:00:04.0/obppath
with this line
/pci@8,600000/SUNW,qlc@4. (the numbers are not important.  the important part 
is the qlc bit)
5) Type this: echo 1 > /sys/devices/pci0001:00/0001:00:04.0/loading
6) Type cat /lib/firmware/ql2200_fw.bin 
> /sys/devices/pci0001:00/0001:00:04.0/data (this is one line)
7) Type echo 0 > /sys/devices/pci0001:00/0001:00:04.0/loading

for 5), 6) and 7) you'll get error message file not found.  It doesn't matter.  
The point is to cache these three command into the shell history so you can 
recall them quickly when you need them.  Remember, you have a window of a few 
seconds and regardless how fast you type you won't make it without using 
cached commands.

8) Unload qla2xxx (rmmod qla2xxx)
9) Now load the kernel module again (modprobe qla2xxx).  The clock starts 
ticking now.  The module tells the kernel that it needs a firmware before the 
hardware can be initialized.  The module creates a device path in /sys and 
creates two files, loading and data.
10) Quickly recall from history the command from 5) and press enter
11) Quickly recall from history the command from 6) and press enter
12) Quickly recall from history the command from 7) and press enter

You'll see messages that the card was initialized.  Now you can load sd_mod.  
If you had to resort to this, then chances are you don't have udev running so 
you may have to manually create the device nodes in /dev.  For your 
convenience:

brw-rw---- 1 root disk 8,  0 2008-02-21 15:03 /dev/sda
brw-rw---- 1 root disk 8,  1 2008-02-21 15:03 /dev/sda1
brw-rw---- 1 root disk 8,  2 2008-02-21 15:03 /dev/sda2
brw-rw---- 1 root disk 8,  3 2008-02-21 15:03 /dev/sda3
brw-rw---- 1 root disk 8,  4 2008-02-21 15:03 /dev/sda4
brw-rw---- 1 root disk 8,  5 2008-02-21 15:03 /dev/sda5
brw-rw---- 1 root disk 8, 16 2008-02-21 15:03 /dev/sdb
brw-rw---- 1 root disk 8, 17 2008-02-21 15:03 /dev/sdb1
brw-rw---- 1 root disk 8, 18 2008-02-21 15:03 /dev/sdb2
brw-rw---- 1 root disk 8, 19 2008-02-21 15:03 /dev/sdb3
brw-rw---- 1 root disk 8, 20 2008-02-21 15:03 /dev/sdb4

Once you have all the device nodes in /dev you can go back to the installer 
and resume.  Make sure you install udev and make sure you copy the binary 
firmware into /lib/firmware.

If you're not fast enough the two files loading and data will disappear.  If 
this happens, don't worry, just unload qla2xxx and load it again, and this 
time make sure you're faster :-)

I've done this in the past and I can guarantee that it works.

2.6.17 was the last kernel where the fimrware was built into the module and 
you didn't have to load it separately.  If you can live with that old kernel, 
you can downgrade.

IvanK.

-- 
gentoo-sparc@lists.gentoo.org mailing list



  reply	other threads:[~2008-02-21 21:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-20 18:26 [gentoo-sparc] QLA2xxx BRM
2008-02-21  1:47 ` Jim Watson
2008-02-21 12:41 ` Pablo Andrés Martikian
2008-02-21 19:50   ` Friedrich Oslage
2008-02-21 20:56     ` Ivan Kabaivanov [this message]
2008-02-28 21:39       ` BRM
2008-02-28 22:05         ` Ivan Kabaivanov
2008-02-28 22:55           ` BRM
2008-02-28 23:39             ` Ivan Kabaivanov
2008-02-29 16:32               ` BRM
2008-02-29 16:58                 ` Andrew Gaffney
2008-02-29 18:13                   ` BRM
2008-03-18 15:21                     ` BRM
2008-03-18 16:22                       ` Pablo Andrés Martikian
2008-03-18 17:00                         ` BRM
     [not found]                           ` <003401c8895c$132c0e30$39842a90$@com>
2008-03-19  0:56                             ` Pablo Martikian
  -- strict thread matches above, loose matches on Subject: below --
2008-03-19 15:35 BRM

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=200802211556.47439.chepati@yahoo.com \
    --to=chepati@yahoo.com \
    --cc=gentoo-sparc@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox