# US 12,008,258 B2 · Data storage device and control method for non-volatile memory

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,008,258 B2
- Document ID: US12008258B2
- Status: Granted
- Kind: B2
- Application number: 17/835,198
- Filed: 2022-06-08
- Published: 2023-08-24
- Granted: 2024-06-11
- Earliest claimed: 2022-02-18
- Assignees: Silicon Motion, Inc.
- Applicants: Silicon Motion, Inc.
- Inventors: Yu-Hao Chang; Yu-Han Hsiao; Po-Sheng Chou
- Web page: https://patentgrep.com/patent/US12008258B2

## CPC

- G06F 3/0619: {in relation to data integrity, e.g. data losses, bit errors}
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0647: {Migration mechanisms}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 11/1048: {using arrangements adapted for a specific error detection or correction feature}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A solution for deteriorated non-volatile memory is shown. When determining that raw data read from the non-volatile memory is undesirable data, the controller updates a deterioration table to record a deteriorated logical address of the raw data that is the undesirable data. In response to a read request that a host issues to read the non-volatile memory for data of the deteriorated logical address, the controller obtains the deteriorated logical address from the deterioration table and informs the host that deterioration has happened at the deteriorated logical address.

## Claims

### Claim 1

A data storage device, comprising:
a non-volatile memory; and
a controller, coupled to the non-volatile memory,
wherein:
when determining that raw data read from the non-volatile memory is undesirable data, the controller updates a deterioration table to record a deteriorated logical address of the raw data that is the undesirable data;
in response to a read request that a host issues to read the non-volatile memory for data of the deteriorated logical address, the controller obtains the deteriorated logical address from the deterioration table and informs the host that deterioration has happened at the deteriorated logical address;
the controller accesses the non-volatile memory through a plurality of channels;
the controller provides a plurality of registers correspond one-to-one with the channels; and
when determining that the raw data is the undesirable data, the controller programs a register corresponding to a channel reading the undesirable data to flag the channel as a flagged channel.

### Claim 2 (depends on 1)

The data storage device as claimed in claim 1, wherein:
the undesirable data is all-1's data or all-0's data.

### Claim 3 (depends on 2)

The data storage device as claimed in claim 2, wherein:
the controller performs safety moving of an erasure unit that stores the raw data in a deteriorated physical address, wherein the raw data is regarded as invalid and is not moved in the safety moving.

### Claim 4 (depends on 2)

The data storage device as claimed in claim 2, wherein:
the controller performs safety moving of an erasure unit that stores the raw data in a deteriorated physical address; and
prior to being moved in the safety moving, the raw data is changed so that it is different from the undesirable data.

### Claim 5 (depends on 2)

The data storage device as claimed in claim 2, wherein:
the controller comprises a scrambling and descrambling module, which performs data scrambling before writing data into the non-volatile memory, and performs data descrambling after reading data from the non-volatile memory;
the controller operates the scrambling and descrambling module to descramble the raw data to obtain a read data, and performs error checking and correction on the read data; and
when the read data fails the error checking and correction, the controller determines whether the raw data without data descrambling is the undesirable data.

### Claim 6 (depends on 5)

The data storage device as claimed in claim 5, wherein:
the controller plans a random access memory to provide a first-in-first-out buffer to buffer physical addresses of the non-volatile memory that a host requests to read, wherein each physical address includes channel information;
the controller checks the first-in-first-out buffer to get physical address candidates corresponding to the flagged channel; and
according to the physical address candidates, the controller reads the non-volatile memory to determine a deteriorated physical address of the raw data that is the undesirable data.

### Claim 7 (depends on 6)

The data storage device as claimed in claim 6, wherein:
according to each physical address candidate, the controller reads a spare information area of the non-volatile memory; and
when reading all-1's bits or all-0's bits from a spare information area, the controller determines that the corresponding physical address candidate is the deteriorated physical address.

### Claim 8 (depends on 7)

The data storage device as claimed in claim 7, wherein:
the controller reads the non-volatile memory according to each physical address candidate without reading a user data area indicated by each physical address candidate.

### Claim 9 (depends on 7)

The data storage device as claimed in claim 7, wherein:
the controller builds a deterioration data structure in the random access memory, and uses an item in the deterioration data structure to store the physical address candidates; and
the controller obtains the physical address candidates from the item in the deterioration data structure to read the non-volatile memory for determination of the deteriorated physical address.

### Claim 10

A control method for a non-volatile memory, comprising:
when determining that raw data read from the non-volatile memory is undesirable data, updating a deterioration table to record a deteriorated logical address of the raw data that is the undesirable data;
in response to a read request that a host issues to read the non-volatile memory for data of the deteriorated logical address, obtaining the deteriorated logical address from the deterioration table and informing the host that deterioration has happened at the deteriorated logical address;
accessing the non-volatile memory through a plurality of channels;
providing a plurality of registers correspond one-to-one with the channels; and
when determining that the raw data is the undesirable data, programming a register corresponding to a channel reading the undesirable data to flag the channel as a flagged channel.

### Claim 11 (depends on 10)

The control method as claimed in claim 10, wherein:
the undesirable data is all-1's data or all-0's data.

### Claim 12 (depends on 11)

The control method as claimed in claim 11, further comprising:
performing safety moving of an erasure unit that stores the raw data in a deteriorated physical address, wherein the raw data is regarded as invalid and is not moved in the safety moving.

### Claim 13 (depends on 11)

The control method as claimed in claim 11, further comprising:
performing safety moving of an erasure unit that stores the raw data in a deteriorated physical address; and
prior to moving the raw data via the safety moving, changing the raw data so that it is different from the undesirable data.

### Claim 14 (depends on 11)

The control method as claimed in claim 11, further comprising:
descrambling the raw data to obtain a read data, and performing error checking and correction on the read data; and
when the read data fails the error checking and correction, determining whether the raw data without data descrambling is the undesirable data.

### Claim 15 (depends on 14)

The control method as claimed in claim 14, further comprising:
providing a first-in-first-out buffer on a random access memory to buffer physical addresses of the non-volatile memory that a host requests to read, wherein each physical address includes channel information;
checking the first-in-first-out buffer to get physical address candidates corresponding to the flagged channel; and
according to the physical address candidates, reading the non-volatile memory to determine a deteriorated physical address of the raw data that is the undesirable data.

### Claim 16 (depends on 15)

The control method as claimed in claim 15, further comprising:
according to each physical address candidate, reading a spare information area of the non-volatile memory; and
when reading all-1's bits or all-0's bits from a spare information area, determining that the corresponding physical address candidate is the deteriorated physical address.

### Claim 17 (depends on 16)

The control method as claimed in claim 16, further comprising:
reading the non-volatile memory according to each physical address candidate without reading a user data area indicated by each physical address candidate.

### Claim 18 (depends on 16)

The control method as claimed in claim 16, further comprising:
building a deterioration data structure in the random access memory, and using an item in the deterioration data structure to store the physical address candidates; and
obtaining the physical address candidates from the item in the deterioration data structure to read the non-volatile memory for determination of the deteriorated physical address.
