forked from len0rd/rockbox
Prevent using PP-based iPods' set_serial_descriptor on S5L87xx-based ones
On PortalPlayer iPods, it looks like the serial number is available in a specific memory location. When adding support for Samsung S5L87xx-based iPods, this algorithm has not been limited to PP-only, so it sets the serial number USB descriptor to random memory data. With this change, it will use the ATA HDD serial number on iPod 6G. On Nano 2G it won't provide a serial number at all. Change-Id: I53d48915d629dbd87b2dbbcba5f228ca5949fa9b
This commit is contained in:
parent
a1c526f35f
commit
9fda39d1ad
1 changed files with 8 additions and 12 deletions
|
|
@ -50,21 +50,17 @@
|
||||||
|
|
||||||
/* TODO: Move target-specific stuff somewhere else (serial number reading) */
|
/* TODO: Move target-specific stuff somewhere else (serial number reading) */
|
||||||
|
|
||||||
#ifdef HAVE_AS3514
|
#if defined(IPOD_ARCH) && defined(CPU_PP)
|
||||||
|
// no need to include anything
|
||||||
|
#elif defined(HAVE_AS3514)
|
||||||
#include "ascodec.h"
|
#include "ascodec.h"
|
||||||
#include "as3514.h"
|
#include "as3514.h"
|
||||||
#endif
|
#elif (CONFIG_CPU == IMX233) && IMX233_SUBTARGET >= 3700
|
||||||
|
|
||||||
#if !defined(HAVE_AS3514) && !defined(IPOD_ARCH) && (CONFIG_STORAGE & STORAGE_ATA)
|
|
||||||
#include "ata.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (CONFIG_CPU == IMX233)
|
|
||||||
#include "ocotp-imx233.h"
|
#include "ocotp-imx233.h"
|
||||||
#endif
|
#elif defined(SANSA_CONNECT)
|
||||||
|
|
||||||
#ifdef SANSA_CONNECT
|
|
||||||
#include "cryptomem-sansaconnect.h"
|
#include "cryptomem-sansaconnect.h"
|
||||||
|
#elif (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
|
#include "ata.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USB_MAX_CURRENT
|
#ifndef USB_MAX_CURRENT
|
||||||
|
|
@ -287,7 +283,7 @@ static unsigned char response_data[256] USB_DEVBSS_ATTR;
|
||||||
|
|
||||||
static const short hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
|
static const short hex[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
|
||||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
|
||||||
#ifdef IPOD_ARCH
|
#if defined(IPOD_ARCH) && defined(CPU_PP)
|
||||||
static void set_serial_descriptor(void)
|
static void set_serial_descriptor(void)
|
||||||
{
|
{
|
||||||
#ifdef IPOD_VIDEO
|
#ifdef IPOD_VIDEO
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue