Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 160409 Details for
Bug 250405
Updated PlayStation 3 support.
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch
kudzu-1.2.70-ps3.patch (text/plain), 5.37 KB, created by
David Woodhouse
on 2007-08-01 13:20:16 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
David Woodhouse
Created:
2007-08-01 13:20:16 UTC
Size:
5.37 KB
patch
obsolete
>--- kudzu-1.2.70/ps3.c~ 2007-08-01 13:39:03.000000000 +0100 >+++ kudzu-1.2.70/ps3.c 2007-08-01 13:58:44.000000000 +0100 >@@ -23,6 +23,27 @@ > #include "kudzuint.h" > #include "modules.h" > >+struct ps3_device_type { >+ int type; >+ const char *driver; >+ const char *desc; >+}; >+ >+static struct ps3_device_type ps3_device_types[] = { >+ [1] = { CLASS_USB, "ehci-hcd", "PlayStation 3 EHCI" }, >+ [2] = { CLASS_USB, "ohci-hcd", "PlayStation 3 OHCI" }, >+ [3] = { CLASS_NETWORK, "gelic_net", "PlayStation 3 Gigabit Ethernet" }, >+/* [4] = { CLASS_OTHER, "ps3av_mod", "PlayStation 3 AV Settings" }, */ >+/* [5] = { CLASS_OTHER, "sys-manager", "PlayStation 3 System Manager" }, */ >+ [6] = { CLASS_HD, "ps3disk", "PlayStation 3 internal disk" }, >+ [7] = { CLASS_SCSI, "ps3rom", "PlayStation 3 Blu-ray drive" }, >+ [8] = { CLASS_OTHER, "ps3flash", "PlayStation 3 OtherOS flash storage" }, >+ [9] = { CLASS_AUDIO, "snd_ps3", "PlayStation 3 audio" }, >+ [10] = { CLASS_VIDEO, "ps3fb", "PlayStation 3 framebuffer" }, >+}; >+#define nr_ps3_devtypes ( sizeof(ps3_device_types) / sizeof(ps3_device_types[0]) ) >+ >+ > static void ps3FreeDevice(struct ps3Device *dev) > { > freeDevice((struct device *) dev); >@@ -58,69 +79,86 @@ struct device *ps3Probe(enum deviceClass > { > #ifdef __powerpc__ > struct ps3Device *ps3dev; >+ DIR * dir; >+ struct dirent * ent; >+ int new_storage = 0; > >- if ((probeClass & CLASS_USB) || >- (probeClass & CLASS_NETWORK)) { >- DIR * dir; >- struct dirent * ent; >- >- if (access("/sys/bus/ps3_system_bus/devices", R_OK)) >- return devlist; >- >- dir = opendir("/sys/bus/ps3_system_bus/devices"); >- while ((ent = readdir(dir))) { >- char path[64]; >- int fd; >- char alias[16]; >- >- snprintf(path, 64, "/sys/bus/ps3_system_bus/devices/%s/modalias", ent->d_name); >- >- fd = open(path, O_RDONLY); >- if (fd < 0) >- continue; >- memset(alias, 0, 16); >- if (read(fd, alias, 15) <= 0) { >- close(fd); >- continue; >- } >+ if (access("/sys/bus/ps3_system_bus/devices", R_OK)) >+ return devlist; >+ >+ dir = opendir("/sys/bus/ps3_system_bus/devices"); >+ while ((ent = readdir(dir))) { >+ char path[64]; >+ int fd; >+ char alias[16]; >+ char *end; >+ int match_id; >+ >+ snprintf(path, 64, "/sys/bus/ps3_system_bus/devices/%s/modalias", ent->d_name); >+ >+ fd = open(path, O_RDONLY); >+ if (fd < 0) >+ continue; >+ memset(alias, 0, 16); >+ if (read(fd, alias, 15) <= 0) { > close(fd); >- if (strncmp(alias, "ps3:", 4)) >- continue; >- if (alias[5] != '\n') >- continue; >- alias[5] = 0; >- if (probeClass & CLASS_USB && alias[4] == '1') { >- ps3dev = ps3NewDevice(NULL); >- ps3dev->type = CLASS_USB; >- ps3dev->desc = strdup("PlayStation 3 EHCI"); >- ps3dev->driver = strdup("ehci-hcd"); >- } else if (probeClass & CLASS_USB && alias[4] == '2') { >- ps3dev = ps3NewDevice(NULL); >- ps3dev->type = CLASS_USB; >- ps3dev->desc = strdup("PlayStation 3 OHCI"); >- ps3dev->driver = strdup("ohci-hcd"); >- } else if (probeClass & CLASS_NETWORK && alias[4] == '3') { >- ps3dev = ps3NewDevice(NULL); >- ps3dev->type = CLASS_NETWORK; >- ps3dev->desc = strdup("PlayStation 3 Gigabit Ethernet"); >- ps3dev->driver = strdup("gelic_net"); >+ continue; >+ } >+ close(fd); >+ if (strncmp(alias, "ps3:", 4)) >+ continue; >+ match_id = strtol(alias+4, &end, 10); >+ if (end == alias+4 || *end != '\n') >+ continue; >+ if (match_id < 1 || match_id >= nr_ps3_devtypes) >+ continue; >+ >+ if (probeClass & ps3_device_types[match_id].type) { >+ ps3dev = ps3NewDevice(NULL); >+ ps3dev->type = ps3_device_types[match_id].type; >+ ps3dev->desc = strdup(ps3_device_types[match_id].desc); >+ if (ps3_device_types[match_id].driver) >+ ps3dev->driver = strdup(ps3_device_types[match_id].driver); >+ else { >+ *end = '\0'; >+ ps3dev->driver = strdup(alias); >+ } >+ /* Back to the sysfs directory */ >+ *(strrchr(path,'/')) = '\0'; >+ >+ /* Special cases */ >+ switch (ps3dev->type) { >+ case CLASS_NETWORK: /* gelic_net */ > __getSysfsDevice((struct device *)ps3dev, path, "net:",0); > if (ps3dev->device) > __getNetworkAddr((struct device *)ps3dev, ps3dev->device); > else > ps3dev->device = strdup("eth"); >- } else >- continue; >+ break; >+ case CLASS_VIDEO: /* ps3fb */ >+ ps3dev->classprivate = (void *)strdup("fbdev"); >+ break; >+ case CLASS_SCSI: >+ new_storage = 1; >+ break; >+ case CLASS_HD: >+ __getSysfsDevice((struct device *)ps3dev, path, "block:", 0); >+ break; >+ case CLASS_OTHER: >+ __getSysfsDevice((struct device *)ps3dev, path, "misc:", 0); >+ break; >+ default: >+ ; >+ } > >- if (!ps3dev->driver) >- ps3dev->driver = strdup(alias); > if (devlist) > ps3dev->next = devlist; > devlist = (struct device *) ps3dev; > } >- closedir(dir); > } >+ closedir(dir); > >+ /* Doesn't match new ps3fb device, but the above does */ > if (probeClass & CLASS_VIDEO) { > char path[64]; > int i; >@@ -144,7 +182,8 @@ struct device *ps3Probe(enum deviceClass > } > } > >- if (probeClass & CLASS_SCSI) { >+ /* Legacy SCSI-based PS3 storage; not if the new ps3_system_bus version is present */ >+ if (probeClass & CLASS_SCSI && !new_storage) { > char model[16]; > int fd = open("/proc/device-tree/model", O_RDONLY); > if (fd >= 0) { >--- kudzu-1.2.70/kudzu.c~ 2007-04-18 01:10:43.000000000 +0100 >+++ kudzu-1.2.70/kudzu.c 2007-08-01 13:57:34.000000000 +0100 >@@ -78,6 +78,7 @@ static struct { > { "VGA16 VGA", "fbdev" }, > { "xen", "fbdev" }, > { "PS3 FB", "fbdev" }, >+{ "ps3fb", "fbdev" }, > { NULL, NULL }, > }; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250405
: 160409