- 
                Notifications
    
You must be signed in to change notification settings  - Fork 153
 
Use BDM bd.devNr for port numbers #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
From scsi to sbp2
0=first port 1=second port Also move devNr responsibility 1 layer down, from scsi to usbmass.
| 
           @rickgaiser ps2homebrew/Open-PS2-Loader#1316 should show improvements with this (after reboot part)? I think the code is mostly fine. sceUsbdGetDeviceLocation should return 0 on success. I don't think it's a good idea to default to devNr = 2 for other cases of path[0]. In the future if many devices will be registered it would be default to it. The two usb port are considered as "root usb hub" with port nr = 0. The ports are 01 and 02. If a hub is connected to any of the ports it will be the actual hub itself that takes 01 or 02 as device and any other found USB device will be 02 in this case.  | 
    
| 
           @rickgaiser I hope #753 gets more attention too! Instead of just samples release having IRX package.  | 
    
          
 I know it will work for neutrino now but for OPL I don't know. That needs to be tested, but I see OPL using the  
 We are developers not users: git pull the source code to a separate local branch and compile. 
 I was thinking about that also. But if the function returns an error, then path should be unchanged and still contain the initialized value  When the usb stick cannot be identified as being in the first or the second port, then using  If you can try the current code that would be nice. I'll try to make the above changes in the next few days but I don't have much time.  | 
    
          
 Yes this PR should fix that issue. That PR has two problems. Second one was random crashes after IOP reboot related to the device number. 
 That seems so much for such a small irx. 
 Well there is nothing using or supporting hubs out there. Neither opl or DKWDRV support hubs so for now this will do for at least 2 USB devices support. 
 I had given deep thoughts to this. My original PR would solve this perfectly. You could keep everything as is, and check the port number for everything without messing with a million device ids. Even with a hub that would still be the same unique port number since the port index number. 
 It's ok, just merge it and close #757  | 
    
| 
           How about, instead of  e.g.  The same thing linux does with   | 
    
          
 There are many solutions to get multiple support but almost all will break most homebrew relying on "mass0" specifically. For now this is a good compromise for both OPL and DKWDRV. So merge? In the future perhaps more can be done.  | 
    
| 
           I tested it and it does not work as expected. 
 So... it's reversed? How can this be? Is this consistent across all ps2 models? MC0 is left, MC1 is right. So I expect things to be counted left-to-right.  | 
    
          
 Ughhhhhhhhhh this will never end. Yes it does so and so it should be. See here Really my PR took care of everything and left everything as is, only the developer had to do extra (but safe check).  | 
    
| 
           Bump @rickgaiser @uyjulian  | 
    
| 
           Suppress cppcheck unused struct member with   | 
    
| 
           Lgtm  | 
    
| 
           I was still testing with USB port numbers on FAT model, as they don't have left/right, but top/bottom. In BDM, the USB numbers are: 
 
 This is how it should be, so ready to merge (but it's already merged I see).  | 
    
Use BDM bd.devNr for port numbers
This reverts commit 2e88fdc.
This reverts commit e14ca1d.
This reverts commit 2e88fdc.
This PR fixes the use of the block_device
devNrfield. Whenever possible thedevNrshould hold a value that is persistent across reboots.The already existing ioctl can be used to query this device number:
ps2sdk/common/include/usbhdfsd-common.h
Lines 38 to 39 in 88fdeb0
@DKWDRV I have put this code together for you, to end the dicussion in #757. I only compile tested it. Please check this commit and test if this works for you.