[ Main Page ]

MACNICA mPS110 (LPM-SCSI2) driver for Linux 2.6

最近たまたま手に入れたLogitecのLPM-SCSI2は古過ぎてLinux 2.6では使えないようです。 PCMCIAのデータベースには、qlogic_csと登録されていますが、 loadするとkernel panicを起こしてまともに使えません。 Linux 2.0では使えるようですが、 今どきこんな古いversionを使うのはちょっと問題があります。 せっかくなので、この古いversionをいろいろと書き換えてとりあえず動くようにしてみました。 ただ、まだ色々と直っていないところがあります。

schedule_work()を使用してqueuecommand()を実装しているためアクセス時にevents/0がかなりCPUを食う(=polling driver) (もとのdriverがIRQを使わない変則的な構造になっていたため。 使えれば嬉しいので、これについては書き換えるつもりはあまりありません。)
HD,CDROMではなぜかLUNのhandlingができない(CDROM,HDをつなぐと、すべてのLUNに応答してしまうのでScsi_Host->max_lun = 1;してあります。)
OBSOLETEな関数が残っている
Linux 2.6での新しいerror handlingに完全に対応できていない(ので時々kernel panic)
特定条件下でkernel panicする(もちろん、mountしたままejectしちゃだめだけど。)

mps110_cs.c for Linux 2.6
まず、展開してmakeします。(kernelのconfigで、SCSIやPCMCIAなど、必要と思われる オプションはつけておくこと)mps110_cs.koができたら、 /lib/modules/(kernel's version)/kernel/drivers/scsi/pcmcia/ にコピーし、depmod -aします。そうしたら、cardmgrの設定ファイル (Gentoo Linuxの場合は/etc/pcmcia/config)のMACNICA mPS110 SCSIの設定を書き換えます。

card "MACNICA mPS110 SCSI"
version "MACNICA", "MIRACLE SCSI-II mPS110"
bind "mps110_cs"

後は、cardmgrを再起動し、周辺機器をカードに接続して電源を入れた上で slotに差し込めばうまくいくと認識します。(何かする前に、sync はしておきましょう。また、SysRqを有効にしておけばもしもの時に便利です。)

追記事項

カーネルのversionが上がったせいか、sym53c500_cs driver が使えるようになったようです。PCMCIAの設定は、qlogic_csを sym53c500_csに直せばよい筈です。

   <dazjorz>  rindolf!
   <dazjorz>  areth thou here?
   <rindolf>  Hi dazjorz
   <dazjorz>  :)
   <rindolf>  dazjorz: yes, I are here.
   <dazjorz>  isn't it kind of weird to have a programming channel when
              there are language specific channels around?
       <Zuu>  Muhah!
   <rindolf>  dazjorz: this is about programming in general.
   <rindolf>  At least theoretically.
   <rindolf>  And VB.NET questions.
 <joeyadams>  Well, ##programming is a good place to ask C questions and
              actually get helpful answers :)
   <dazjorz>  rindolf: did you intentionally make it look like vb.net is
              not programming?
   <rindolf>  dazjorz: meet Zuu - he's into Windows and D and stuff.
   <dazjorz>  !
   <rindolf>  dazjorz: no.
   <rindolf>  dazjorz: VB.NET is programming.
   <dazjorz>  hey Zuu, I'm dazjorz, I'm into linux and c and stuff.
   <rindolf>  But it has its own channel.
       <Zuu>  :>
   <dazjorz>  rindolf: I've been thinking about changing nicks
   <rindolf>  dazjorz: ah. so did I.
           *  Zuu is into everything sane, except the boring stuff
   <rindolf>  dazjorz: to what?
   <dazjorz>  rindolf: my current one is waaaay too lame, but "sjors" is
              probably too generic
   <rindolf>  dazjorz: I like dazjorz
   <dazjorz>  rindolf: I don't, because when people see my name is sjors,
              da zjorz is just too lame to bear
   <dazjorz>  rindolf: I was thinking about sjors, or some three-letter
              abbreviation of my name, sjg or so
       <Zuu>  how about.... 'carrot' ?
   <dazjorz>  I think I do prefer dazjorz over carrot
       <Zuu>  no worries, i promise not to stuff you up rindolf's tomato
              nose
       <Zuu>  hum :<
   <dazjorz>  Zuu: when I first read your nick on Shlomi's site five
              minutes ago, I asked him whether you were a mix between
              Zorix and Buu
   <dazjorz>  do you know the two?
   <rindolf>  Zoffix and buu.
       <Zuu>  nope
   <dazjorz>  uh zoffix yeah
   <dazjorz>  Zuu: okay, well, you don't know them, but believe me, I'm
              glad you're not a mix of the two, that would be horrible :P
       <Zuu>  im a mix of much worse personalities im sure
       <Zuu>  most of them just happen to cancel each other out

    -- Introudcing dazjorz to Zuu
    -- ##programming, Freenode

Q:	How many IBM types does it take to change a light bulb?
A:	Fifteen.  One to do it, and fourteen to write document number
	GC7500439-0001, Multitasking Incandescent Source System Facility,
	of which 10% of the pages state only "This page intentionally
	left blank", and 20% of the definitions are of the form "A:.....
	consists of sequences of non-blank characters separated by blanks".


Powered by UNIX fortune(6)
[ Main Page ]