Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fire Wire HD Problems
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
RadioImp
n00b
n00b


Joined: 09 Sep 2003
Posts: 22

PostPosted: Thu Nov 06, 2003 7:50 pm    Post subject: Fire Wire HD Problems Reply with quote

Hi there!
I've been trying to get my Maxtor 80gig External FireWire HD to work under gentoo.
It runs fine under windows.
I have read any stuff i can find on these forums, and on the internet to get these to work, but I still can't.
It appears to be detecting it, but not assigning it to a /dev/device:
Code:

ieee1394: sbp2: Logged into SBP-2 device
ieee1394: sbp2: Node[01:1023]: Max speed [S400] - Max payload [2048]
ieee1394: Device added: Node[01:1023]  GUID[0010b920003da836]  [Maxtor]


This is the output of dmesg
I am runing the gentoo-sources 2.4.20 version5 kernel.
I think i have the right modules compiled in (though i have them directly compiled, not as modules)
scsi emulation does appear to work, as my USB drive will appear in /dev as sda1 and is mountable, i just cannot get the firewire drive to appear in there.
Can anyone help, or provide a compelte tutorial link on how to get these things working?
Thanks very much for any assistance
--
Tom
Back to top
View user's profile Send private message
frogger
n00b
n00b


Joined: 05 Dec 2002
Posts: 35

PostPosted: Fri Nov 07, 2003 2:07 am    Post subject: Reply with quote

I believe this has something to do with firewire being initialized after the scsi bus has been scanned for devices. You will need the necessary ieee1394 components loaded into the kernel (either statically or as modules). These should be: ieee1394, ohci1394, and sbp2, which it looks like you already have.

After bootup if the drive isn't detected and assigned a device node, you can run the rescan-scsi-bus.sh script, which will check for new devices and create the node for you, probably /dev/sdb in your case.

Here is the script:
Code:

#!/bin/bash
# Script to rescan SCSI bus, using the
# scsi add-single-device mechanism
# (w) 98/03/19 Kurt Garloff <kurt@garloff.de> (c) GNU GPL

# Return hosts. /proc/scsi/HOSTADAPTER/? must exist
findhosts ()
{
  hosts=
  for name in /proc/scsi/*/?; do
    name=${name#/proc/scsi/}
    if test ! $name = scsi
      then hosts="$hosts ${name#*/}"
      echo "Host adapter ${name#*/} (${name%/*}) found."
    fi
  done
}

# Test if SCSI device $host $channen $id $lun exists
# Outputs description from /proc/scsi/scsi, returns new
testexist ()
{
  grepstr="scsi$host Channel: 0$channel Id: 0*$id Lun: 0$lun"
  new=`cat /proc/scsi/scsi|grep -e"$grepstr"`
  if test ! -z "$new"
    then cat /proc/scsi/scsi|grep -e"$grepstr"
    cat /proc/scsi/scsi|grep -A2 -e"$grepstr"|tail -2|pr -o4 -l1
  fi
}

# Perform search (scan $host)
dosearch ()
{
  for channel in $channelsearch; do
    for id in $idsearch; do
      for lun in $lunsearch; do
        new=
   devnr="$host $channel $id $lun"
   echo "Scanning for device $devnr ..."
   printf "OLD: "
   testexist
   if test ! -z "$remove" -a ! -z "$new"
     then echo "scsi remove-single-device $devnr" >/proc/scsi/scsi
     echo "scsi add-single-device $devnr" >/proc/scsi/scsi
     printf "\r\x1b[A\x1b[A\x1b[AOLD: "
     testexist
     if test -z "$new"; then printf "\rDEL: \r\n\n\n\n"; let rmvd+=1; fi
   fi
   if test -z "$new"
     then printf "\rNEW: "
     echo "scsi add-single-device $devnr" >/proc/scsi/scsi
     testexist
     if test -z "$new"; then printf "\r\x1b[A"; else let found+=1; fi
   fi
      done
    done
  done
}
    
 
# main
if test @$1 = @--help -o @$1 = @-h
  then
    echo "Usage: rescan-scsi-bus.sh [-l] [-w] [-c] [host [host ...]]"
    echo " -l activates scanning for LUNs 0 .. 7 [default: 0]"
    echo " -w enables scanning for device IDs 0 .. 15 [def.: 0 .. 7]"
    echo " -r enables removing of devices        [default: disabled]"
    echo " -c enables scanning of channels 0 1   [default: 0]"
    echo " If hosts are given, only these are scanned [default: all]"
    exit 0
fi

# defaults
lunsearch="0"
idsearch="0 1 2 3 4 5 6 7"
channelsearch="0"
remove=""

# Scan options
opt="$1"
while test ! -z "$opt" -a -z "${opt##-*}"; do
  opt=${opt#-}
  case "$opt" in
    l) lunsearch="0 1 2 3 4 5 6 7" ;;
    w) idsearch="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" ;;
    c) channelsearch="0 1" ;;
    r) remove=1 ;;
    *) echo "Unknown option -$opt !" ;;
  esac
  shift
  opt="$1"
done   

# Hosts given ?
if test @$1 = @; then findhosts; else hosts=$*; fi

declare -i found=0
declare -i rmvd=0
for host in $hosts; do dosearch; done
echo "$found new device(s) found.               "
echo "$rmvd device(s) removed.                 "


If the drive is always going to be connected, you might want to set this to run at startup. If not, you can always just run it after you plug the drive in. I imagine you could automate all of this somehow with hotplug, but I haven't looked at that. I just run it at boot and go. :)
Back to top
View user's profile Send private message
RadioImp
n00b
n00b


Joined: 09 Sep 2003
Posts: 22

PostPosted: Fri Nov 07, 2003 9:10 am    Post subject: Reply with quote

Many thanks, i'll try this when i get home tonight, will see how that goes.
Back to top
View user's profile Send private message
cylgalad
Veteran
Veteran


Joined: 18 Apr 2003
Posts: 1327
Location: France

PostPosted: Fri Nov 07, 2003 9:48 am    Post subject: Reply with quote

The script can be downloaded there : http://www.garloff.de/kurt/linux/rescan-scsi-bus.sh
If you read the comments in /usr/src/linux/drivers/ieee1394/sbp2.c :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum